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

Make headlamp-plugin faster #1899

Open
joaquimrocha opened this issue Apr 9, 2024 · 3 comments · May be fixed by #1941
Open

Make headlamp-plugin faster #1899

joaquimrocha opened this issue Apr 9, 2024 · 3 comments · May be fixed by #1941
Assignees
Labels
headlamp-plugin Related to the headlamp-plugin NPM package. performance plugins

Comments

@joaquimrocha
Copy link
Collaborator

headlamp-plugin checks whether there are updates to it every time we run it. While this is nice and useful in a normal use, if we run the command repeatedly, this feature does impact dev experience by taking a long time when we may just be running a simple command, as every check takes usually 1.5-2.0 sec .

So I suggest we only check for updates a limited number of times per day. Maybe once a day is even enough.

If the update is to be skipped, we could print a message telling the user how to force check the updates.

cc/ @illume

@joaquimrocha joaquimrocha added the headlamp-plugin Related to the headlamp-plugin NPM package. label Apr 9, 2024
@illume
Copy link
Contributor

illume commented Apr 10, 2024

Are you having this issue in just the npm start command?

That should usually be only run once, and then the command just sits there watching for changes - with no update check done. I understand it would be more of a problem when the npm start was buggy and it had to be run on each change.

It could be made async, so it doesn't block the user getting work done. I think it uses npm internally, which could be switched to a direct https call.

@illume illume added the plugins label Apr 10, 2024
@joaquimrocha
Copy link
Collaborator Author

During the "watch" bug it was certainly annoying. But also in live demos it usually just seems like it takes too long.
I think it's worth making faster or only running sporadically, but certainly not urgent.

@skoeva skoeva linked a pull request May 1, 2024 that will close this issue
@skoeva skoeva linked a pull request May 1, 2024 that will close this issue
@illume
Copy link
Contributor

illume commented May 8, 2024

@skoeva I want to emphasize this part of my comment:

It could be made async, so it doesn't block the user getting work done.

If the check is done async, then it can show the message some moments later. This avoids having state, and has the benefit that it isn't slow once a day. The user is never slowed down in their work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
headlamp-plugin Related to the headlamp-plugin NPM package. performance plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants