Opened 3 years ago

Last modified 3 years ago

#9606 new defect

Rendering slow when having lots of custom fields and rules

Reported by: jbeilicke Owned by: robguttman
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12


The plugin works like a charm in general. Unfortunately, the rendering of a ticket takes about 10s in Chrome 16 (and even more in FF) when having about 45 custom fields that should be hidden or displayed depending on components and ticket types.

According to some quick tests, the performance issue might be caused by several nested $.each() in dynfields.html, one time in the function apply_rules() and in the jQuery(document).ready() part.

Do you see any chance that this part might be refactored to improve the performance?

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by jbeilicke

I've investigated the issue further:

  • Replaced jQuery.each() with native JavaScript for-loops: No performance gain.
  • Set some console.time() measuring points: It turned out that moving each field in the DOM triggered in layout.js causes the slow-down.

comment:2 Changed 3 years ago by robguttman

jbeilicke, really appreciate you investigating performance issues here. I admit I have not concerned myself with performance oprimizations as I haven't personally seen problems - but then I have a lot less fields than you do it seems.

Let me know what you find in your profiling and I'll be happy to attempt fixes accordingly.

Add Comment

Modify Ticket

as new The owner will remain robguttman.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.