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

Delay metals/slowTask until task has been running for more than a few seconds #234

Closed
olafurpg opened this issue Mar 10, 2020 · 0 comments · Fixed by #505
Closed

Delay metals/slowTask until task has been running for more than a few seconds #234

olafurpg opened this issue Mar 10, 2020 · 0 comments · Fixed by #505

Comments

@olafurpg
Copy link
Member

Describe the bug

Currently, Metals starts a lot of short-lived window progress notifications when everything is cached:

  • "Loading presentation compiler"
  • "Downloading Metals"
  • "Preparing worksheets"

These tasks can take a few hundred milliseconds to complete when the coursier cache is full. It would be nice if the VS Code extension waited ~2 seconds to start the progress notification

To Reproduce Steps to reproduce the behavior:

  1. Open a worksheet
  2. "Reload window"

Screenshot 2020-03-10 at 10 56 23

Screenshot 2020-03-10 at 10 56 16

Expected behavior

I expected those progress windows not to appear because they complete in <1 second.

Installation:

  • Operating system: macOS
  • Metals version: 0.8.1

Additional context

Docs for metals/slowTask https://scalameta.org/metals/docs/editors/new-editor.html#metalsslowtask

This change can be implemented by delaying window.withProgress here

window.withProgress(

It shouldn't be necessary to change anything on the Metals server side.

gourlaysama added a commit to gourlaysama/metals-vscode that referenced this issue Feb 12, 2021
This waits 3 seconds before showing the full progress notification.
It avoids multiple notifications appearing and immediately leaving for
short-lived tasks.

Fixes scalameta#234
gourlaysama added a commit to gourlaysama/metals-vscode that referenced this issue Feb 12, 2021
This waits 3 seconds before showing the full progress notification.
It avoids multiple notifications appearing and immediately leaving for
short-lived tasks.

Fixes scalameta#234
gourlaysama added a commit to gourlaysama/metals-vscode that referenced this issue Feb 12, 2021
This waits 2 seconds before showing the full progress notification
(assuming the task is still running by then).
It avoids multiple notifications appearing and immediately leaving for
short-lived tasks.

Fixes scalameta#234
gourlaysama added a commit to gourlaysama/metals-vscode that referenced this issue Feb 12, 2021
This waits 2 seconds before showing the full progress notification
(assuming the task is still running by then).
It avoids multiple notifications appearing and immediately leaving for
short-lived tasks.

Fixes scalameta#234
gourlaysama added a commit to gourlaysama/metals-vscode that referenced this issue Feb 12, 2021
This waits 2 seconds before showing the full progress notification
(assuming the task is still running by then).
It avoids multiple notifications appearing and immediately leaving for
short-lived tasks.

Fixes scalameta#234
gourlaysama added a commit to gourlaysama/metals-vscode that referenced this issue Feb 21, 2021
This waits 2 seconds before showing the full progress notification
(assuming the task is still running by then).
It avoids multiple notifications appearing and immediately leaving for
short-lived tasks.

Fixes scalameta#234
kasiaMarek pushed a commit to kasiaMarek/metals-vscode that referenced this issue Mar 29, 2023
…rn/types/node-14.14.22

Bump @types/node from 14.14.21 to 14.14.22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants