Bug 264669 - Do not synchronously measure SVG text every time it changes
Summary: Do not synchronously measure SVG text every time it changes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-11 05:16 PST by Ahmad Saleem
Modified: 2023-12-07 09:41 PST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-11-11 05:16:30 PST
Hi team,

While going through Blink's commit, I came across another potential optimization but I haven't confirmed whether it is something applicable in WebKit realm or not.

Blink Commit: https://chromium.googlesource.com/chromium/src.git/+/34c351416a102e4ee510badb86fbc4f57604ccd0

WebKit Source: https://searchfox.org/wubkat/rev/3e2262b3476ecfb5666a35bcdd746d474c061b0d/Source/WebCore/rendering/svg/RenderSVGText.cpp#286

Just wanted to raise to get an input from others.

____

It compiles:

// The positioning elements cache depends on the size of each text renderer in the
    // subtree. If this changes, clear the cache and mark it for rebuilding in the next layout.
    m_layoutAttributesBuilder.clearTextPositioningElements();
    setNeedsPositioningValuesUpdate();
    setNeedsLayout();

_____

Thanks!
Comment 1 Vitor Roriz 2023-11-15 05:32:17 PST
Cool. I can check if break anything and/or have a significant performance boost with that change. Thank you!
Comment 2 Radar WebKit Bug Importer 2023-11-15 06:08:07 PST
<rdar://problem/118451741>
Comment 3 Vitor Roriz 2023-12-04 07:25:39 PST
Pull request: https://github.com/WebKit/WebKit/pull/21278
Comment 4 EWS 2023-12-07 09:40:58 PST
Committed 271678@main (97f84b2e6bd1): <https://commits.webkit.org/271678@main>

Reviewed commits have been landed. Closing PR #21278 and removing active labels.