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

Improve problem view performance #12408

Merged
merged 3 commits into from
May 23, 2023

Conversation

hyy215
Copy link
Contributor

@hyy215 hyy215 commented Apr 13, 2023

What it does

Fixed #12407

  1. Delay inserting nodes to marker tree. Collect and sort the nodes, and insert to the root.
    If insert N nodes one by one, it maybe compare 1 + 2 + ... + (N - 2) + (N - 1) + N times.
  2. Creates a debounced function that delays updating decoration.
  3. Setting markers for a model only if the monaco model exists.

How to test

Check that the bugs descriped in #12407.

  • Operating System: win10(cpu i7-8700K, memory 16G)
number of files before now
500 4639ms 85ms
1000 17180ms 122ms
2000 69509ms 217ms
10000 too long 1160ms

Review checklist

Reminder for reviewers

@msujew msujew added the problems issues related to the problems widget label Apr 16, 2023
Signed-off-by: huangyanyan <hyy215215@163.com>
Signed-off-by: huangyanyan <hyy215215@163.com>
1. use protected instead of private
2. split the debounce part from the actual execution
3. increase delay to 50ms
4. use array to store markers

Signed-off-by: huangyanyan <hyy215215@163.com>
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution, looks good to me 👍

@msujew msujew merged commit 96c8f90 into eclipse-theia:master May 23, 2023
@msujew msujew added this to the 1.38.0 milestone May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problems issues related to the problems widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem view is slow when setting markers of multiple files
3 participants