Online OCR demo is 1.5x slower in Nightly and spends a lot of time in Baseline
Categories
(Core :: JavaScript Engine, task, P5)
Tracking
()
People
(Reporter: mayankleoboy1, Unassigned)
References
(Blocks 1 open bug)
Details
Go to : https://bensonruan.com/ocr-javascript-extract-text-from-image/
Select the attached image
Click to do an OCR
Chrome: https://share.firefox.dev/4c1DboG (2.6s)
Nightly: https://share.firefox.dev/3UZh9wP (3.2s)
Comment 1•3 months ago
|
||
This code is weird. It looks like it might be Emscripten output targeting asm.js, except that it's not actually using asm.js. The hotspot is a single 5K-line function. At first I thought it might be too big to Ion-compile, but that's not actually true. However, I do see that we invalidate twice for FirstExecution. I think the most likely explanation is that it takes a long time to Ion-compile this code and we invalidate before we get a chance to use it much.
This code should really be targeting wasm instead. I don't think it's particularly valuable for us to invest in optimizing this case.
Description
•