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

Perf: Make output channel logging faster in web #172336

Closed
mjbvz opened this issue Jan 25, 2023 · 5 comments
Closed

Perf: Make output channel logging faster in web #172336

mjbvz opened this issue Jan 25, 2023 · 5 comments
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author output Output channel system issues perf verified Verification succeeded web Issues related to running VSCode in the web
Milestone

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Jan 25, 2023

Steps to Reproduce:

  1. Set "typescript.tsserver.log": "verbose"
  2. On insiders.vscode.dev, open a JS/TS file and type a bunch in the file to trigger TS Server requests
  3. Open the output panel and look at the TypeScript Server log section

Bug
The output log updates slowly and continues updating long after you finish typing

We are using vscode.OutputChannel. I've debugged this and believe that the TS logs all of the information quickly. It seems like the issue is with the display/update of the output channel content in the UI

@mjbvz
Copy link
Collaborator Author

mjbvz commented Jan 25, 2023

I believe the root cause is the FileLogger. In particular, every call to the FileLogger.log takes between 150 and 400ms on my machine, and TS makes a large number of log calls per second if you type quickly

@mjbvz mjbvz added the perf label Jan 25, 2023
@sandy081 sandy081 added output Output channel system issues web Issues related to running VSCode in the web labels Jan 25, 2023
@sandy081 sandy081 added this to the February 2023 milestone Jan 25, 2023
@sandy081 sandy081 modified the milestones: February 2023, March 2023 Feb 20, 2023
@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Mar 5, 2023
@sandy081 sandy081 changed the title Output channels on web appear to be slow Perf: Make output channel logging faster in web Mar 6, 2023
@sandy081 sandy081 removed the bug Issue identified by VS Code Team member as probable bug label Mar 6, 2023
@sandy081
Copy link
Member

sandy081 commented Mar 15, 2023

@mjbvz I assume this is what you are observing (following your steps) that after opening the log, content keeps updating for a while

before.mp4

After

Improved it using throttler and this is how it is after - after output is opened, content is updated just once.

after.mp4

@sandy081
Copy link
Member

Please try this out in tomorrow's insiders.

sandy081 added a commit that referenced this issue Mar 15, 2023
@sandy081 sandy081 added the author-verification-requested Issues potentially verifiable by issue author label Mar 16, 2023
@sandy081
Copy link
Member

Fixed by fe8f738

@mjbvz
Copy link
Collaborator Author

mjbvz commented Mar 16, 2023

Thanks. Looking much better now

@mjbvz mjbvz added the verified Verification succeeded label Mar 16, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author output Output channel system issues perf verified Verification succeeded web Issues related to running VSCode in the web
Projects
None yet
Development

No branches or pull requests

3 participants