Closed Bug 566942 Opened 11 years ago Closed 11 years ago
Text Fragment::Set To can be slow
Seems like in some testcases (dromaeo for example), nsTextFragment::SetTo is very slow. Jonas, is there anything we could optimize, or could we just undo Bug 329974?
Perhaps we could limit the whitespace optimizations to small strings?
We definitely should limit to scanning short strings! We can't use static data for strings longer than a certain size anyway.
I'm guessing we would want to collect data from the wild to determine what size of string we want to limit the optimisations to. However, in any case, is this worth taking as a starting point?
Attachment #449111 - Flags: review?(jonas)
Have you profiled the patch with some testcases?
Comment on attachment 449111 [details] [diff] [review] Don't look for whitespace optimisations beyond the maximum whitespace string size I did a bunch of profiling when I initially implemented this sharing. See bug 329974. Of course, the world has likely changed since then so if someone wants to profile again that would be great.
Attachment #449111 - Flags: review?(jonas) → review+
Did this ever land?
Checked in. Thanks for the fix! Sorry about taking so long to land it :( Let me know if you have more time to help out, we've got plenty of things that need patches! http://hg.mozilla.org/mozilla-central/rev/c2fcc089efae
Assignee: nobody → graememcc_firefox
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.2
You need to log in before you can comment on or make changes to this bug.