RESOLVED FIXED 177028
Avoid calling String::format() in PlatformCAFilters::setFiltersOnLayer()
https://bugs.webkit.org/show_bug.cgi?id=177028
Summary Avoid calling String::format() in PlatformCAFilters::setFiltersOnLayer()
Said Abou-Hallawa
Reported 2017-09-15 16:53:00 PDT
From instrumenting the MotionMark Focus test with fixed complexity, this function alone takes 2% of the execution time.
Attachments
Patch (1.62 KB, patch)
2017-09-15 16:55 PDT, Said Abou-Hallawa
no flags
Patch (1.64 KB, patch)
2017-09-15 17:26 PDT, Said Abou-Hallawa
no flags
Patch (1.64 KB, patch)
2017-09-15 18:44 PDT, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2017-09-15 16:55:48 PDT
Tim Horton
Comment 2 2017-09-15 17:10:49 PDT
Comment on attachment 320969 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320969&action=review > Source/WebCore/ChangeLog:8 > + String::fromat() is a bigger hammer for what we need to do in this function. FROMAT > Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:71 > + static NeverDestroyed<String> filterNamePrefix ="filter_"; There's a missing space after the =. Also isn't there a way to make this more efficient b/c it comes from a literal (something like ASCIILiteral? or does that just happen magically? I don't know. Look around.)
Said Abou-Hallawa
Comment 3 2017-09-15 17:26:50 PDT
Said Abou-Hallawa
Comment 4 2017-09-15 18:44:38 PDT
WebKit Commit Bot
Comment 5 2017-09-15 19:26:48 PDT
Comment on attachment 320984 [details] Patch Clearing flags on attachment: 320984 Committed r222125: <http://trac.webkit.org/changeset/222125>
WebKit Commit Bot
Comment 6 2017-09-15 19:26:49 PDT
All reviewed patches have been landed. Closing bug.
Sam Weinig
Comment 7 2017-09-17 15:18:38 PDT
Comment on attachment 320984 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320984&action=review > Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:74 > + String filterName = filterNamePrefix.get() + String::number(i); For the future, this could be make more efficient by doing: #include <wtf/text/StringConcatenate.h> #include <wtf/text/StringConcatenateNumbers.h> auto filterName = makeString("filter_", i);
Radar WebKit Bug Importer
Comment 8 2017-09-27 12:41:37 PDT
Note You need to log in before you can comment on or make changes to this bug.