Inactive debugger slows down js that uses data-urls
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: tcampbell, Assigned: bhackett1024)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
URL: https://www.datascience.com/blog/stock-price-time-series-arima
(There are several perf bugs going on there, but this bug is about the debugger source URL atomization)
The RememberSourceURL method added recently is being triggered for each function clone under js::CloneFunctionAndScript. When the page uses data URLs this can lead several seconds spent atomizing.
Related to this is the strlen call for RememberSourceURL can be quite slow just to determine string is too large. In Bug 1577161 I'll introduce a js_strnlen which might also be useful here.
Reporter | ||
Comment 1•5 years ago
|
||
Profile: https://perfht.ml/2znJVfN
Reporter | ||
Comment 2•5 years ago
|
||
The ScriptSource::filename is now a SharedImmutableString under the hood so we could use that instead of atomizing filenames immediately. Ideally we'd also add an onNewScriptSource hook to debugger.
Reporter | ||
Comment 4•5 years ago
|
||
Looking at this more, I don't think this is urgent for FF70. In the degenerate example, the impact is much smaller than several of the other factors there.
Reporter | ||
Comment 5•5 years ago
|
||
Actually in the degenerate case it contributes several seconds to page load. I'm unclear if it comes up on other websites or not.
Assignee | ||
Comment 6•5 years ago
|
||
Assignee | ||
Comment 7•5 years ago
|
||
This might need to wait for bug 1577161 to get js_strnlen, but just using strnlen compiles locally for me at least. I can look into improving the data structure here to avoid atomizing the filenames, but this small fix should take care of the O(N) behavior when dealing with huge filenames.
Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e61f7df8ebf2 Use strnlen to test if source URLs are too long, r=tcampbell.
Comment 9•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•