-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Performance of refresh is still subpar #134
Description
Follow up from #131 (comment)
It looks like refresh and the layout is still taking far too long in a real application scenario. Consider the following portion of a Chromium timeline when running ls -lR /usr/share in VS Code, which takes around 3.5s for the process to run but ~25s until it's finished in the UI.
My initial thoughts on this were that it was taking too long to parse the incoming data in Terminal.prototype.write but this timeline seems to refute that. All time is spent in refresh and functions/events it triggers.
Here is the timeline for a single refresh:
And zoomed in even more to the portion of refresh that gets repeated:
The basic flow of the section that repeats is:
- Blur/focusout events
- Recalc style
- Lots of separate parse HTML sections
- Recalc style
- Layout
- Focus/focusin events
- Recalc style
- Layout
Looking at this, refresh's performance could still certainly be improved. In the meantime another thing that would be good to have to protect against this is to skip refreshes if a refresh is already in progress.


