-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Any file is taking seconds to open #21404
Comments
Thank you very much for the report, and sorry for the crappy experience! Just in case we are unable to reproduce: if you could capture a sample of Zed while attempting to open a file, using |
I've opened a PR over at #21414. It is a speculative fix, but I could reproduce app hangs when opening (non-)Python files after introducing an artificial 5s sleep within code responsible for finding Python virtual environments. A trace would be great to confirm that this part of code is where we're spending most of the time. I would also appreciate it if you could run PET from the root of your project; I'm specifically interested in how much time it takes on your machine.
There should be "Completed in X ms" line at the end. On my machine it takes 84ms. |
Potentially fixes #21404 This is a speculative fix, as while I was trying to repro this issue I've noticed that introducing artificial delays in ToolchainLister::list could impact apps responsiveness. These delays were essentially there to stimulate PET taking a while to find venvs. Release Notes: - Improved app responsiveness in environments with multiple Python virtual environments
Potentially fixes #21404 This is a speculative fix, as while I was trying to repro this issue I've noticed that introducing artificial delays in ToolchainLister::list could impact apps responsiveness. These delays were essentially there to stimulate PET taking a while to find venvs. Release Notes: - Improved app responsiveness in environments with multiple Python virtual environments
Potentially fixes #21404 This is a speculative fix, as while I was trying to repro this issue I've noticed that introducing artificial delays in ToolchainLister::list could impact apps responsiveness. These delays were essentially there to stimulate PET taking a while to find venvs. Release Notes: - Improved app responsiveness in environments with multiple Python virtual environments
… (#21420) Cherry-picked toolchains: Run listing tasks on background thread (#21414) Potentially fixes #21404 This is a speculative fix, as while I was trying to repro this issue I've noticed that introducing artificial delays in ToolchainLister::list could impact apps responsiveness. These delays were essentially there to stimulate PET taking a while to find venvs. Release Notes: - Improved app responsiveness in environments with multiple Python virtual environments Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
… (#21421) Cherry-picked toolchains: Run listing tasks on background thread (#21414) Potentially fixes #21404 This is a speculative fix, as while I was trying to repro this issue I've noticed that introducing artificial delays in ToolchainLister::list could impact apps responsiveness. These delays were essentially there to stimulate PET taking a while to find venvs. Release Notes: - Improved app responsiveness in environments with multiple Python virtual environments Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Hey, guys! Thanks for the quick response and quick work! @osiewicz I ran 5 times, all samples fell between 2000ms~2200ms
@maxbrunsfeld here is the sample. I opened Zed, opened some files in Zed and then got the sample. Because of Murphy's Law, first file opened fast, but all others took roughly 2 seconds each to open. Sample
|
Ok, it sounds like @osiewicz was correct - the Python Environment Tools CLI can take a long time to execute, and we were accidentally waiting for that process on the main thread. |
Thanks for the info @ggalves - we're building a new release with the fix. |
I've kicked off new Preview (0.164.1) and Stable (0.163.3) builds; they should be out within an hour. |
Ok, releases are out. |
@osiewicz Updated to 0.163.3 here. I've tested and it fixed the problem here. Thank you so much! |
Check for existing issues
Describe the bug / provide steps to reproduce it
Since Zed 0.162.x version, It started taking seconds to open any file. Trying to debug, i ran
tail -f ~/Library/Logs/Zed/Zed.log
and while waiting to file open, this was logged:
Note: I was not trying to open a python file. This problem happens in every file that there is no open tab
Seems to be a problem with this auto detection of Python Env. As noted from logs, I do use python from asdf version manager
Environment
Zed: v0.163.2 (Zed)
OS: macOS 14.6.1
Memory: 18 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log
The text was updated successfully, but these errors were encountered: