Bug 195840 - [JSC] jsSubstring should resolve rope before calling JSRopeString::create
Summary: [JSC] jsSubstring should resolve rope before calling JSRopeString::create
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-15 18:07 PDT by Yusuke Suzuki
Modified: 2019-03-18 10:51 PDT (History)
7 users (show)

See Also:


Attachments
Patch (25.95 KB, patch)
2019-03-15 18:15 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (26.10 KB, patch)
2019-03-15 18:23 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (27.49 KB, patch)
2019-03-15 18:27 PDT, Yusuke Suzuki
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2019-03-15 18:07:57 PDT
[JSC] jsSubstring should resolve rope before calling JSRopeString::create
Comment 1 Yusuke Suzuki 2019-03-15 18:15:56 PDT
Created attachment 364895 [details]
Patch
Comment 2 Yusuke Suzuki 2019-03-15 18:23:44 PDT
Created attachment 364898 [details]
Patch
Comment 3 Yusuke Suzuki 2019-03-15 18:27:06 PDT
Created attachment 364899 [details]
Patch
Comment 4 Geoffrey Garen 2019-03-16 13:59:54 PDT
Comment on attachment 364899 [details]
Patch

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

r=me

> Source/JavaScriptCore/ChangeLog:13
> +        We can find that a lot of substrings for length = 1 are allocated in RAMification regexp tests. This patch avoids creation of these

How much memory does this patch save?
Comment 5 Yusuke Suzuki 2019-03-17 15:14:20 PDT
Comment on attachment 364899 [details]
Patch

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

>> Source/JavaScriptCore/ChangeLog:13
>> +        We can find that a lot of substrings for length = 1 are allocated in RAMification regexp tests. This patch avoids creation of these
> 
> How much memory does this patch save?

It shows (patched) 34938880 v.s. (tot) 36163584  in non-JIT regexp, 3.5%.
Comment 6 Yusuke Suzuki 2019-03-18 10:50:53 PDT
Committed r243081: <https://trac.webkit.org/changeset/243081>
Comment 7 Radar WebKit Bug Importer 2019-03-18 10:51:28 PDT
<rdar://problem/48984367>