Patch #31855

Speed up workflow edit page rendering

Added by Felix Schäfer 11 days ago. Updated about 10 hours ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Performance
Target version:4.1.0

Description

Currently the list of WorkflowTransitions workflows is scanned twice (#detect in app/views/workflows/_form.html.erb, select in app/helpers/workflows_helper.rb) for each possible Status pair shown on the workflow edit page (the number of status pairs is itself quadratic with the number of statuses). This leads to the rendering time for this page to be quadratic with the number of Status pairs.

The patch provided in the next update calculates all required data only once for the page instead of once for each Status pair. In a test with 90 issue statuses in development mode on a laptop the total rendering time for the workflow edit page was changed from ~103 seconds before the patch to ~2,5s with the patch.

31855.patch Magnifier (1.79 KB) Felix Schäfer, 2019-08-06 22:03

Associated revisions

Revision 18373
Added by Go MAEDA about 10 hours ago

Speed up workflow edit page rendering (#31855).

Patch by Felix Schäfer.

History

#1 Updated by Felix Schäfer 11 days ago

Here is the patch.

#2 Updated by Go MAEDA 11 days ago

  • Target version set to Candidate for next major release

#3 Updated by Go MAEDA 5 days ago

  • Target version changed from Candidate for next major release to 4.1.0

Setting the target version to 4.1.0.

#4 Updated by Go MAEDA about 10 hours ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch. It improves the rendering speed significantly. Thanks!

Also available in: Atom PDF