Bug 200034 - StringBuilder::append(makeString(...)) is inefficient
Summary: StringBuilder::append(makeString(...)) is inefficient
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-07-23 09:30 PDT by Sam Weinig
Modified: 2019-07-29 13:13 PDT (History)
4 users (show)

See Also:


Attachments
WIP (82.37 KB, patch)
2019-07-23 09:34 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (88.56 KB, patch)
2019-07-28 11:14 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (89.47 KB, patch)
2019-07-28 12:36 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (89.46 KB, patch)
2019-07-29 12:34 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2019-07-23 09:30:56 PDT
Now that we have StringBuilder::flexibleAppend(), we should replace the inefficient use of StringBuilder::append(makeString(...)) to avoid the unneeded string allocation.
Comment 1 Sam Weinig 2019-07-23 09:34:24 PDT
Created attachment 374684 [details]
WIP
Comment 2 Sam Weinig 2019-07-28 11:14:03 PDT
Created attachment 375042 [details]
Patch
Comment 3 Sam Weinig 2019-07-28 12:36:54 PDT
Created attachment 375044 [details]
Patch
Comment 4 Saam Barati 2019-07-28 17:28:52 PDT
Comment on attachment 375044 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=375044&action=review

Nice

> Source/WebCore/ChangeLog:14
> +        A lot more can be done to improve the efficiency of StringBuilder use in the WHLSL code including:

Good tips. I might look into doing some of these. Metal codegen is one of the most expensive phases in WHLSL codegen.
Comment 5 Sam Weinig 2019-07-29 12:34:27 PDT
Created attachment 375091 [details]
Patch
Comment 6 WebKit Commit Bot 2019-07-29 13:12:32 PDT
Comment on attachment 375091 [details]
Patch

Clearing flags on attachment: 375091

Committed r247917: <https://trac.webkit.org/changeset/247917>
Comment 7 WebKit Commit Bot 2019-07-29 13:12:33 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-07-29 13:13:17 PDT
<rdar://problem/53675482>