Bug 99121

Summary: RenderBR should share its constant newline string between instances.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
poch none

Andreas Kling
Reported 2012-10-11 17:34:32 PDT
This one is a game changer.
Attachments
poch (1.18 KB, patch)
2012-10-11 17:35 PDT, Andreas Kling
no flags
Andreas Kling
Comment 1 2012-10-11 17:35:12 PDT
Anders Carlsson
Comment 2 2012-10-11 17:37:40 PDT
Comment on attachment 168324 [details] poch r=gooby.\n\n\n\n
Eric Seidel (no email)
Comment 3 2012-10-11 18:47:11 PDT
Comment on attachment 168324 [details] poch Really? Wow. Amazing. Why not put this in the AtomicString cache? Do we think it won't appear elsewhere?
Eric Seidel (no email)
Comment 4 2012-10-11 18:48:06 PDT
I suspect we have a lot of Text nodes which are just whitespace. Possibly many who are just a '\n'. I guess Text nodes don't use AtomicStrings though, so making this atomic wouldn't help them...
Andreas Kling
Comment 5 2012-10-12 09:52:56 PDT
(In reply to comment #3) > (From update of attachment 168324 [details]) > Really? Wow. Amazing. Why not put this in the AtomicString cache? Do we think it won't appear elsewhere? This way we're paying 1 global String to avoid a hash lookup on every RenderBR creation. I don't have any data suggesting this is a bottleneck, but it seemed like the right tradeoff to go for.
WebKit Review Bot
Comment 6 2012-10-12 09:58:51 PDT
Comment on attachment 168324 [details] poch Clearing flags on attachment: 168324 Committed r131195: <http://trac.webkit.org/changeset/131195>
WebKit Review Bot
Comment 7 2012-10-12 09:58:54 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.