-
Notifications
You must be signed in to change notification settings - Fork 29.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PerfSampleError] #187460
Comments
@jerch FYI I think this means there was a case where this took >10% of a 5 second period (so >500ms) of time that was profiled: vscode/src/vs/workbench/contrib/performance/electron-sandbox/rendererAutoProfiler.ts Line 78 in 6ea4677
vscode/src/vs/platform/profiling/electron-sandbox/profileAnalysisWorker.ts Lines 31 to 37 in 6ea4677
I guess the image was just really large? Full screen window + tall terminal + 4k monitor? I'm seeing this happened 146 time on 127 machines for the latest stable, so over about 6 days. |
Not sure how actionable this is. |
Well one of my bigger local test images is 6000x4000px and accounts for ~25MB sixel-encoded - and the overall throughput from Still this should not happen during normal image decoding, as all the decoders work chunkwise and return control flow to the sequence parser after one chunk has been processed. Could it be, that the test inserts all the bytes of one big image into one |
If it was write that wouldn't explain why createImageBitmap is the expensive call though 🤔. I'm going to close this as it's complaining about a browser API call taking too much time and we don't have enough info. |
Ah ok, I did not know that it only means the runtime of that call. Is the measured time here raw runtime of that call (from call to resolve), or mainthread blocking time? Because the latter should not happen due to being an async call, ofc the first can happen, if the image is quite big. |
I think I misinterpreted it initially and it means that there was 500ms+ of blocking time (10% of 5 seconds) and the biggest consumer of that (top bottom up profile entry) was |
This is relatively new though and something might be going wrong with the measurement. The async thing in particular confuses me. |
Eww, well thats not good. Sadly I dont understand the line numbers the stacktrace gives, so idk which code path ran into that bad timing. From the callback at least it seems to be triggered right from initial addon startup, which makes me wonder, how thats even possible? Wouldn't the terminal (+addon) be spawned much earlier in terms of event loop invocations, before any real data arrives at it? |
I think you're on to something here. The terminal is started after the "restored" phase which is probably when the perf sample stuff kicks in. There could be an unbounded amount of terminals being restored, across multiple windows (some could be on the same CPU if that matters), each one could have 4 canvases being created. Maybe |
Hmm, sounds plausible. It still makes me wonder, even if it had to restore like 20+ terminals at once, why would Ah well, no clue - I'd say if its not a pressing issue we should track that in the xterm.js repo once the addon got added. Maybe some of my init path stuff creates a high workload, and we are able to defer it somehow. |
Might have found the issue taking pretty long during startup - seems thats related to the on-the-fly placeholder generation, which currently happens during addon init. Should be able to defer that as well. |
jerch/xterm-addon-image#56 should remove most of the addon init burden, its lit. down to a few variable assigments. Everything else got deferred. Note that this wont help with blocking time, if there is a rather big single |
Go to Errors Site
The text was updated successfully, but these errors were encountered: