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

Foam v0.25.9 very slow #1345

Closed
ktrNozomi opened this issue Mar 17, 2024 · 13 comments
Closed

Foam v0.25.9 very slow #1345

ktrNozomi opened this issue Mar 17, 2024 · 13 comments

Comments

@ktrNozomi
Copy link

Describe the bug

When in Vim mode (either Vim extension or VSCode Neovim extension), enter :w to save the current editing file, and the file will not respond to any key strokes.

I uninstalled Foam extension, the problem doesn't exist.
I returned back to Foam v0.25.8, the problem doesn't exist.

Small Reproducible Example

No response

Steps to Reproduce the Bug or Issue

See the bug description.

Expected behavior

After saving the file, the editor should respond to key strokes normally.

Screenshots or Videos

No response

Operating System Version

Windows 11

Visual Studio Code Version

1.87.2 User mode

Additional context

No response

@ktrNozomi ktrNozomi changed the title v0.25.9 conflicts with Vim extension or VSCode Neovim extension Foam v0.25.9 conflicts with Vim extension or VSCode Neovim extension Mar 17, 2024
@ais
Copy link

ais commented Mar 18, 2024

It takes 2 – 5 seconds to save a file after #1344. I assume this is why input is blocked when the Vim extension is enabled.

See also: #1344 (comment)

@riccardoferretti
Copy link
Collaborator

Thanks for reporting the issue, I will push the fix right away (silly bug)

@riccardoferretti
Copy link
Collaborator

I just pushed v0.25.10 - let me know if you are still experiencing the problem. Will close the issue if the problem is gone

@riccardoferretti riccardoferretti changed the title Foam v0.25.9 conflicts with Vim extension or VSCode Neovim extension Foam v0.25.9 very slow Mar 18, 2024
@ais
Copy link

ais commented Mar 18, 2024

v0.25.10 seems to have made it worse for me. My inputs are blocked on saving now even when I am not using the Vim extension, even tho the file seems to save immediately now. Code is using 30% CPU during this time; thrice as much as patch 9.

@riccardoferretti
Copy link
Collaborator

Can you check what happens if you revert to 0.25.8 ? Does that solve the issues you are having?

@ktrNozomi
Copy link
Author

@riccardoferretti after updating to v0.25.10, the key stroke responds normally; but I see as @ais said, the same situation happens to me -- the CPU increased to 30% after saving the file. But this doesn't influence the fluency on my machine, my CPU is AMD R7 5850U.

@riccardoferretti
Copy link
Collaborator

@ktrNozomi can you also do the comparison with 0.25.8? Just wanna be sure that in the meantime something hasn't changed in VS Code that instead seems related to the extension (this happened in the past).
Can you and @ais please:

  1. check the current state with 0.25.10
  2. revert the extension to 0.25.8
  3. compare the resource utilization
  4. let us know :)

I am saying this because, beside the bug I introduced, the changes should not have performance implications. There might be another more subtle bug, looking into it

@ktrNozomi
Copy link
Author

@riccardoferretti after testing, it seems that v0.25.8 has no problem and v0.25.10 has performance issue.

This is v0.25.8:
v0 25 8

This is v0.25.10:
v0 25 10

@ais
Copy link

ais commented Mar 18, 2024

I reverted to 0.25.8 shortly after my last comment as an immediate solution, and haven't experienced any issues with it. CPU usage never goes above 3%.

I haven't updated Code recently; I'm running v1.85.2 (2024-01-18).

@riccardoferretti
Copy link
Collaborator

Ok thx, will look into it

@riccardoferretti
Copy link
Collaborator

Ok, I think I have found the actual problem and pushed 0.25.11 which should have addressed it.
@ais @ktrNozomi can you please let me know if things get better?

@ktrNozomi
Copy link
Author

Ok, I think I have found the actual problem and pushed 0.25.11 which should have addressed it. @ais @ktrNozomi can you please let me know if things get better?

Thanks a lot for your work! Now everything works fine on my machine. Thanks @ais too for finding bugs!

@riccardoferretti
Copy link
Collaborator

Thank you both for bringing it up to my attention, cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants