Skip to content
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

Speed up insertion and deletion of values in SortedList by batching and deferring to idle task #5038

Merged
merged 11 commits into from Apr 20, 2024

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Apr 20, 2024

Fixes #4911

Test setup:

  • 10000 scrollback filled
  • Decoration stress test button
  • ~10000 * 20 = ~200,000 decorations

Before:

Insert ~4s
Delete ~4s

image

After:

Insert ~330ms
Delete ~93ms

There's still a decent amount of GC happening on insert, but a lot of it has to happen due to the variables being used in callbacks. It's reasonable when you consider it's 200000 decorations.

image

@Tyriar Tyriar added this to the 5.6.0 milestone Apr 20, 2024
@Tyriar Tyriar self-assigned this Apr 20, 2024
@Tyriar Tyriar enabled auto-merge April 20, 2024 18:17
@Tyriar Tyriar merged commit 0d799ba into xtermjs:master Apr 20, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mass decoration registration and disposable is slow
1 participant