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

@hyy215 hyy215 force-pushed the problem-performance branch from 960c6bb to ede2c38 Compare April 14, 2023 00:48
@msujew msujew added the problems issues related to the problems widget label Apr 16, 2023
@hyy215 hyy215 force-pushed the problem-performance branch from ede2c38 to 4f1516f Compare April 19, 2023 01:28
@hyy215 hyy215 requested a review from msujew April 19, 2023 07:38
hyy215 added 3 commits April 20, 2023 15:18
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>
@msujew msujew force-pushed the problem-performance branch from 0292bf0 to f2b6148 Compare April 20, 2023 13:18
@vince-fugnitto vince-fugnitto modified the milestone: 1.37.0 Apr 27, 2023
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