Closed Bug 1674306 Opened 4 years ago Closed 4 years ago

Improve stencil XDR decode + instantiation performance

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: arai, Unassigned)

References

Details

Attachments

(2 files, 1 obsolete file)

non-async script needs to be decoded + instantiated on main thread.
currently stencil-XDR decode takes almost same time as JSScript-XDR decode,
and script instantiation takes also takes similar time.
it means if we replace JSScript-XDR decode with stencil-XDR decode + instantiation, it takes twice as longer.

we should reduce the time taken by those steps

Attached file micro benchmark from gmail (patch) (obsolete) (deleted) —

benchmark taken from raptor tp6 gmail.
it contains 4 XDR encoded data for with/without stencil XDR.

those 4 scripts are <script> without async, and decoded on main thread.
and the extra time taken by them almost matches the regression.

the result is the following

$ js xdr-test/b.js
[before]
11825 [us]
3403 [us]
4081 [us]
4956 [us]

$ js --no-off-thread-parse-global xdr-test/b.js
[after]
19841 [us]
5201 [us]
8163 [us]
7431 [us]
Depends on: 1674351
Depends on: 1674674
Attached file micro benchmark from gmail (patch) (deleted) —

Updated the testcase to print the best score of 100 runs.

Attachment #9184692 - Attachment is obsolete: true

and the output

$ js xdr-test/b.js
[before]
7108
1871
3037
2875

$ js --no-off-thread-parse-global xdr-test/b.js
[after]
14687
3316
5396
5535
Depends on: 1675241
Depends on: 1675804
Attached file bench for 1675804 (deleted) —

Updated bench for 1675804

Depends on: 1675962
Depends on: 1676670
Depends on: 1676673
Depends on: 1676688
Depends on: 1676821
Depends on: 1677224
Depends on: 1677260
Depends on: 1677312
Depends on: 1677401
Depends on: 1677528
Depends on: 1678449
Depends on: 1678705
Depends on: 1678723
Depends on: 1683273
Depends on: 1683623

closing, given the standalone decode+instantiate perf is good enough to flip the stencil-mvp pref.
any new bugs should be filed under bug 1609486.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: