RESOLVED LATER 95406
Deploy ASCIILiteral in FontCacheWin.cpp
https://bugs.webkit.org/show_bug.cgi?id=95406
Summary Deploy ASCIILiteral in FontCacheWin.cpp
Adam Barth
Reported 2012-08-29 17:19:33 PDT
Deploy ASCIILiteral in FontCacheWin.cpp
Attachments
Patch (1.95 KB, patch)
2012-08-29 17:20 PDT, Adam Barth
benjamin: review-
benjamin: commit-queue-
Adam Barth
Comment 1 2012-08-29 17:20:16 PDT
Benjamin Poulain
Comment 2 2012-08-29 18:05:37 PDT
Comment on attachment 161365 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=161365&action=review > Source/WebCore/platform/graphics/win/FontCacheWin.cpp:330 > + AtomicString(ASCIILiteral("Times New Roman")), > + AtomicString(ASCIILiteral("Microsoft Sans Serif")), > + AtomicString(ASCIILiteral("Tahoma")), > + AtomicString(ASCIILiteral("Lucida Sans Unicode")), > + AtomicString(ASCIILiteral("Arial")) AtomicString should always use AtomicString::ConstructFromLiteral. (I should prevent AtomicString(ASCIILiteral) explicitly in AtomicString.h.) The reason is I want to have compile time computation of the hash value in the future. When that template is done, we would not need to do any access to the characters at construction. Sorry, I did not made that clear in my previous explanation, I did not anticipate this fast mass deployment of literal strings.
Benjamin Poulain
Comment 3 2012-08-29 18:08:19 PDT
Hum, and the reason I want compile time hashing is that we spend quite some time in AtomicString when initializing WebKit. We spend a lot of time loading memory we do not use immediately.
Adam Barth
Comment 4 2012-08-29 18:11:25 PDT
Ok. Would you be willing to add that information to the wiki?
Benjamin Poulain
Comment 5 2012-08-29 18:20:40 PDT
(In reply to comment #4) > Ok. Would you be willing to add that information to the wiki? I updated the WiKi. I really want the implicit conversion to fail to compile, I'll fix that in https://bugs.webkit.org/show_bug.cgi?id=95413.
Note You need to log in before you can comment on or make changes to this bug.