WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
166097
[JSC] JS Parser should work concurrently
https://bugs.webkit.org/show_bug.cgi?id=166097
Summary
[JSC] JS Parser should work concurrently
Yusuke Suzuki
Reported
2016-12-20 09:54:53 PST
<script async>, <script defer> and ES6 modules can receive benefit from parsing JS concurrently.
Attachments
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2017-06-01 06:10:13 PDT
The largest problem is Identifier's AtomicStringTable. We never want to access to one AtomicStringTable concurrently. Fortunately, our parser infrastructure has ParserArena. And we access to Identifier through const Identifier*. So, my current plan is 1. Decouple VM from ParserArena. This also decouples VM from Parser largely. 2. ParserArena should have AtomicStringTable like things. And Parser arena generates Identifier. 3. Finally, we will merge AtomicStrings in non-UI thread into main thread's table. The great thing is that ParserArena holds Identifiers. Thus, after merging AtomicStrings, we will replace Identifier's impl with main-thread AtomicStringImpls.
Yusuke Suzuki
Comment 2
2017-06-01 06:11:24 PDT
(In reply to Yusuke Suzuki from
comment #0
)
> <script async>, <script defer> and ES6 modules can receive benefit from > parsing JS concurrently.
Since JSC's module mechanism is largely confined in JSC side, we can easily use concurrent JS parser in JSC. (I mean that it is not good design that WebCore touches concurrent JSC JS parsers).
Saam Barati
Comment 3
2017-06-01 09:27:12 PDT
Cool! I remember talking to Antti at some point where he said he wanted this.
Antti Koivisto
Comment 4
2017-06-02 10:33:37 PDT
+1
Yusuke Suzuki
Comment 5
2017-06-14 23:01:57 PDT
Interesting.
http://dl.acm.org/citation.cfm?id=3004281
Yeah, we should consider pre-parse hash table and string table.
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