WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
270492
[IFC] Let's try to reuse previously computed breaking positions
https://bugs.webkit.org/show_bug.cgi?id=270492
Summary
[IFC] Let's try to reuse previously computed breaking positions
zalan
Reported
2024-03-04 16:22:33 PST
ssia
Attachments
Patch
(28.58 KB, patch)
2024-03-04 16:26 PST
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(30.86 KB, patch)
2024-03-08 16:41 PST
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(31.28 KB, patch)
2024-03-09 05:30 PST
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(35.52 KB, patch)
2024-03-09 20:39 PST
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(30.18 KB, patch)
2024-03-10 08:20 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(30.18 KB, patch)
2024-03-10 10:25 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(30.21 KB, patch)
2024-03-10 19:37 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(30.36 KB, patch)
2024-03-11 10:56 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
[fast-cq]Patch
(33.57 KB, patch)
2024-03-11 12:50 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
zalan
Comment 1
2024-03-04 16:26:49 PST
Created
attachment 470168
[details]
Patch
zalan
Comment 2
2024-03-08 16:41:58 PST
Created
attachment 470254
[details]
Patch
zalan
Comment 3
2024-03-09 05:30:28 PST
Created
attachment 470262
[details]
Patch
zalan
Comment 4
2024-03-09 20:39:34 PST
Created
attachment 470272
[details]
Patch
zalan
Comment 5
2024-03-10 08:20:02 PDT
Created
attachment 470276
[details]
Patch
zalan
Comment 6
2024-03-10 10:25:48 PDT
Created
attachment 470278
[details]
Patch
zalan
Comment 7
2024-03-10 19:37:36 PDT
Created
attachment 470281
[details]
Patch
zalan
Comment 8
2024-03-11 10:56:12 PDT
Created
attachment 470296
[details]
Patch
Antti Koivisto
Comment 9
2024-03-11 12:05:21 PDT
Comment on
attachment 470296
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=470296&action=review
> Source/WebCore/layout/formattingContexts/inline/text/TextBreakingPositionCache.h:80 > +} // namespace Layout > +} // namespace WebCore > + > +namespace WTF { > + > +template<> struct HashTraits<WebCore::Layout::TextBreakingPositionContext> : GenericHashTraits<WebCore::Layout::TextBreakingPositionContext> { > + static void constructDeletedValue(WebCore::Layout::TextBreakingPositionContext& slot) { slot.isHashTableDeletedValue = true; } > + static bool isDeletedValue(const WebCore::Layout::TextBreakingPositionContext& value) { return value.isHashTableDeletedValue; } > + static WebCore::Layout::TextBreakingPositionContext emptyValue() { return { }; } > +}; > + > +template<> struct DefaultHash<WebCore::Layout::TextBreakingPositionContext> : WebCore::Layout::TextBreakingPositionContextHash { }; > + > +} // namespace WTF > + > +namespace WebCore { > +namespace Layout {
maybe put the HashTraits goo the the end of the file to avoid bouncing between namespaces?
> Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:1127 > + Layout::TextBreakingPositionCache::singleton().clear();
It would bet better to call this directly from MemoryRelease.cpp since now it gets unnecessarily called repeatedly for each LineLayout
zalan
Comment 10
2024-03-11 12:46:15 PDT
(In reply to Antti Koivisto from
comment #9
)
> Comment on
attachment 470296
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=470296&action=review
> > > Source/WebCore/layout/formattingContexts/inline/text/TextBreakingPositionCache.h:80 > > +} // namespace Layout > > +} // namespace WebCore > > + > > +namespace WTF { > > + > > +template<> struct HashTraits<WebCore::Layout::TextBreakingPositionContext> : GenericHashTraits<WebCore::Layout::TextBreakingPositionContext> { > > + static void constructDeletedValue(WebCore::Layout::TextBreakingPositionContext& slot) { slot.isHashTableDeletedValue = true; } > > + static bool isDeletedValue(const WebCore::Layout::TextBreakingPositionContext& value) { return value.isHashTableDeletedValue; } > > + static WebCore::Layout::TextBreakingPositionContext emptyValue() { return { }; } > > +}; > > + > > +template<> struct DefaultHash<WebCore::Layout::TextBreakingPositionContext> : WebCore::Layout::TextBreakingPositionContextHash { }; > > + > > +} // namespace WTF > > + > > +namespace WebCore { > > +namespace Layout { > > maybe put the HashTraits goo the the end of the file to avoid bouncing > between namespaces?
moved all this to a dedicated file.
> > > Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:1127 > > + Layout::TextBreakingPositionCache::singleton().clear(); > > It would bet better to call this directly from MemoryRelease.cpp since now > it gets unnecessarily called repeatedly for each LineLayout
that's a good point!
zalan
Comment 11
2024-03-11 12:50:45 PDT
Created
attachment 470298
[details]
[fast-cq]Patch
Radar WebKit Bug Importer
Comment 12
2024-03-11 17:23:12 PDT
<
rdar://problem/124417278
>
EWS
Comment 13
2024-03-11 19:41:49 PDT
Committed
275949@main
(33c8b3c4ff39): <
https://commits.webkit.org/275949@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 470298
[details]
.
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