Last Comment Bug 566942 - nsTextFragment::SetTo can be slow
: nsTextFragment::SetTo can be slow
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: mozilla5
Assigned To: Graeme McCutcheon [:graememcc]
:
Mentors:
: 77586 (view as bug list)
Depends on:
Blocks: domperf
  Show dependency treegraph
 
Reported: 2010-05-19 13:41 PDT by Olli Pettay [:smaug] (high review load, please consider other reviewers)
Modified: 2011-03-30 11:03 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Don't look for whitespace optimisations beyond the maximum whitespace string size (748 bytes, patch)
2010-06-03 14:53 PDT, Graeme McCutcheon [:graememcc]
jonas: review+
Details | Diff | Review

Description Olli Pettay [:smaug] (high review load, please consider other reviewers) 2010-05-19 13:41:53 PDT
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?
Comment 1 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2010-05-19 14:06:39 PDT
Perhaps we could limit the whitespace optimizations to small strings?
Comment 2 Jonas Sicking (:sicking) PTO Until July 5th 2010-05-19 14:17:35 PDT
We definitely should limit to scanning short strings! We can't use static data for strings longer than a certain size anyway.
Comment 3 Graeme McCutcheon [:graememcc] 2010-06-03 14:53:08 PDT
Created attachment 449111 [details] [diff] [review]
Don't look for whitespace optimisations beyond the maximum whitespace string size

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?
Comment 4 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2010-06-03 15:37:51 PDT
Have you profiled the patch with some testcases?
Comment 5 Jonas Sicking (:sicking) PTO Until July 5th 2010-06-07 17:17:48 PDT
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.
Comment 6 :Ms2ger 2010-08-16 12:59:37 PDT
*** Bug 77586 has been marked as a duplicate of this bug. ***
Comment 7 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2010-09-28 08:51:55 PDT
Did this ever land?
Comment 8 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2011-03-30 08:04:02 PDT
Jonas?
Comment 9 Jonas Sicking (:sicking) PTO Until July 5th 2011-03-30 10:58:01 PDT
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

Note You need to log in before you can comment on or make changes to this bug.