Project

General

Profile

Actions

Patch #32523

open

Improve javascript performances on query edition

Added by Stéphane Parunakian over 4 years ago. Updated over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Performance
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hi,

When building a query on the /issues page, if you use a filter on users (assigned to, author, etc.) and you have a lot of them, the browser freezes for a few moments. This can be improved by slightly modifying the JavaScript running on the page.

In the public/javascripts/application.js, a lot of "for" loops use var.length in their statements, which is evaluated at each loop.

The attached patch adds, for each loop, a var assignment just before the loop, which is used in the statement.

Performances are greatly improved on Firefox and Chromium.

Regards


Files

javascript-perf.diff (1.85 KB) javascript-perf.diff Stéphane Parunakian, 2019-11-27 16:49
javascript-perf2.diff (1.85 KB) javascript-perf2.diff Stéphane Parunakian, 2019-11-29 10:56
execution_speed_measurement.png (223 KB) execution_speed_measurement.png Yuichi HARADA, 2019-12-10 04:14
Actions

Also available in: Atom PDF