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

A serious performance problem about Disposable #9375

Closed
christlee1989 opened this issue Apr 20, 2021 · 0 comments · Fixed by #9376
Closed

A serious performance problem about Disposable #9375

christlee1989 opened this issue Apr 20, 2021 · 0 comments · Fixed by #9376
Labels
performance issues related to performance quality issues related to code and application quality

Comments

@christlee1989
Copy link

Bug Description:

If you call the Disposable.push method multiple times and pass in the same disposable instance, it will cause the "dispose" method to be nested wrapped, which will lead to serious performance problems(Maximum call stack size exceeded).

packages/core/src/common/disposable.ts
1

packages/core/src/browser/shell/tab-bar-toolbar.tsx
2

3

Steps to Reproduce:

  1. In the Disposable.push method, mark each wrapped method and record the number of times that the method is wrapped.

in packages/core/src/common/disposable.ts
4

in packages/core/src/browser/shell/tab-bar-toolbar.tsx
5

  1. After starting the IDE, keep switching editor tabs in the editor area, check the console log, you can see that the number of calls to the wrapped method is increasing
    6

Additional Information

  • Operating System: macOS 10.15.7
  • Theia Version: 1.12.0
christlee1989 pushed a commit to christlee1989/theia that referenced this issue Apr 20, 2021
christlee1989 pushed a commit to christlee1989/theia that referenced this issue Apr 20, 2021
@vince-fugnitto vince-fugnitto added performance issues related to performance quality issues related to code and application quality labels Apr 20, 2021
colin-grant-work pushed a commit that referenced this issue May 28, 2021
gbodeen pushed a commit to gbodeen/theia that referenced this issue Jun 1, 2021
gbodeen pushed a commit to gbodeen/theia that referenced this issue Jun 1, 2021
dna2github pushed a commit to dna2fork/theia that referenced this issue Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance issues related to performance quality issues related to code and application quality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants