-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat(cli): check for updates in background #15974
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may not only increase startup time, but also cause unexpected network access. In some cases, security warnings may be triggered. (such as internal networks without Internet at all) It is also a question whether Deno's cloud service will access the network every time when it is started. |
What you can do is write an empty file
That won't work. We want to present "There's a new version 1.65.2" before anything else gets printed to stdout. Otherwise it will be quite confusing. |
I want to argue that startup time is way more important than printing this banner. We can have a cake and eat it too by doing the check in the background and printing the banner at the top on the subsequent run. |
Even if IMO we should reconsider doing this check & display in |
Was trying to optimize it this morning and I found that this PR does not meaningfully impact startup time.
|
That's what is implemented in this patch. |
ccd252a
to
a3732f6
Compare
Main branch vs this one. It appears this one is faster.
Tho it seems main startup time has gotten much worse than when @littledivy measured it. 26ms vs 13ms. |
@ry that might be because this branch isn't uptodate with |
Latest benchmark:
|
+bench |
⏳ Provisioning metal... id: Use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Not finished yet; I'll push changes that limit number of syscalls used today. |
+bench |
⏳ Provisioning metal... id: Use |
|
+bench |
⏳ Provisioning metal... id: Use |
+bench status 6f04148f-cd14-4ada-bc98-6d402d897c64 |
✅ Device provisioned 91% metro: Silicon Valley (US) |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should fix how we get the cache directory.
@dsherret addressed the feedback, I changed the checker to only run with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.