WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
157749
Regression(
r177786
): GlyphMetricsMap<T>::locatePageSlowCase() fills existing pages with unknown metrics
https://bugs.webkit.org/show_bug.cgi?id=157749
Summary
Regression(r177786): GlyphMetricsMap<T>::locatePageSlowCase() fills existing ...
Chris Dumez
Reported
2016-05-16 13:24:32 PDT
GlyphMetricsMap<T>::locatePageSlowCase() fills existing pages with unknown metrics after <
http://trac.webkit.org/changeset/177786
>. Previously, we would only to this for new pages.
Attachments
Patch
(5.08 KB, patch)
2016-05-16 13:38 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2016-05-16 13:38:57 PDT
Created
attachment 279040
[details]
Patch
Chris Dumez
Comment 2
2016-05-16 13:39:09 PDT
Still testing locally.
Chris Dumez
Comment 3
2016-05-16 13:47:01 PDT
Found this by looking at PLT profiles that seeing that WebCore::GlyphMetricsMap<WebCore::FloatRect>::locatePageSlowCase(unsigned int) is slow.
Antti Koivisto
Comment 4
2016-05-17 11:08:18 PDT
Comment on
attachment 279040
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=279040&action=review
Nice find, r=me
> Source/WebCore/platform/graphics/GlyphMetricsMap.h:123 > + auto& pageInMap = m_pages->add(pageNumber, nullptr).iterator->value; > + if (!pageInMap) > + pageInMap = std::make_unique<GlyphMetricsPage>(unknownMetrics()); > + return *pageInMap;
If you want to be fancy you could do something like return *m_pages.ensure(pageNumber, [] { return std::make_unique<GlyphMetricsPage>(unknownMetrics(); } ).iterator->value;
WebKit Commit Bot
Comment 5
2016-05-17 11:30:06 PDT
Comment on
attachment 279040
[details]
Patch Clearing flags on attachment: 279040 Committed
r201023
: <
http://trac.webkit.org/changeset/201023
>
WebKit Commit Bot
Comment 6
2016-05-17 11:30:11 PDT
All reviewed patches have been landed. Closing bug.
Chris Dumez
Comment 7
2016-05-18 09:02:17 PDT
Looks like a ~1% PLT progression on Mac.
Chris Dumez
Comment 8
2016-05-18 09:03:45 PDT
(In reply to
comment #7
)
> Looks like a ~1% PLT progression on Mac.
Ditto on iOS.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug