Bug 242571 - Explore skipping fastStringify for a while if it’s been failing repeatedly
Summary: Explore skipping fastStringify for a while if it’s been failing repeatedly
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-07-10 06:03 PDT by Darin Adler
Modified: 2022-10-10 16:50 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2022-07-10 06:03:29 PDT
Some tests in Speedometer2 are slower because they try the stringify fast path over and over again and it doesn't work. We should assume that if we call stringify repeatedly it is likely the calls will either all work with the fast path or all fail. We can create a heuristic where each time the stringify fast path fails we don’t try it again for some number of subsequent calls. That way if we are repeatedly doing calls that work with the fast path we'll keep using it every time, and if we are repeatedly doing calls that don't work with the fast path we'll only try it some small percentage of the time.

We can judge this heuristic with Speedometer2 itself, but it's likely the heuristic will also be effective on web content in the wild.
Comment 1 Darin Adler 2022-07-11 08:51:52 PDT
My first try at this did not help significantly, so I think I’ll drop this.
Comment 2 Radar WebKit Bug Importer 2022-07-17 06:04:15 PDT
<rdar://problem/97151013>