The performance of linkdom.NodeShellSort
Bug #933594 reported by
Richard Webb
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
D Programming language Xml modules |
Fix Released
|
Undecided
|
michaelrynn |
Bug Description
The NodeShellSort function contains a 'gapseq' array that gets rebuilt on each call, and when making large numbers of calls to sort with collections of length 0 or 1 (for example, when there is a large number of nodes with one attribute each), i see a large performance gain when making the array 'static immutable' instead of const.
This is with DMD 2.058 on Windows. (which is itself a lot faster than 2.057 due to GC optimizations).
(fwiw the performance issue looks like hidden calls to __d_arrayliteralTX causing large amounts of GC traffic).
Changed in d2-xml: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
As an example, it takes ~5 seconds to load the attached file with the current version, but i see that drop by over a second with that change (i was quite surprised by the size of the improvement).