Giter Site home page Giter Site logo

Comments (5)

ghostbuster91 avatar ghostbuster91 commented on June 11, 2024

after turning on debug logging I can see that whenever I save a file LSP server recompiles some parts of the project which causes a wall of

e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:245: scan_dir_async - start 
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:245: scan_dir_async - start 
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:245: scan_dir_async - start 
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:245: scan_dir_async - start 
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:245: scan_dir_async - start 
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:245: scan_dir_async - start 
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish
e/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:268: scan_dir_async - finish

followed by

...ckages/start/p_nvim-neotree/lua/neo-tree/git/ignored.lua:143: Failed to load ignored files for 
...ckages/start/p_nvim-neotree/lua/neo-tree/git/ignored.lua:143: Failed to load ignored files for 
...ckages/start/p_nvim-neotree/lua/neo-tree/git/ignored.lua:143: Failed to load ignored files for 
...ckages/start/p_nvim-neotree/lua/neo-tree/git/ignored.lua:143: Failed to load ignored files for 
...ckages/start/p_nvim-neotree/lua/neo-tree/git/ignored.lua:143: Failed to load ignored files for 
...ckages/start/p_nvim-neotree/lua/neo-tree/git/ignored.lua:143: Failed to load ignored files for 
...ckages/start/p_nvim-neotree/lua/neo-tree/git/ignored.lua:143: Failed to load ignored files for 
...ckages/start/p_nvim-neotree/lua/neo-tree/git/ignored.lua:143: Failed to load ignored files for 

A lot of directories gets rescanned even though they might have been already collapsed.

from neo-tree.nvim.

pynappo avatar pynappo commented on June 11, 2024

i recently got #1343 merged to main which should handle the errors more gracefully without causing those mass stacktraces. can you switch branches and try it out?

edit: i don't know if this would fix performance in any way, though.

from neo-tree.nvim.

pysan3 avatar pysan3 commented on June 11, 2024

@Hexdigest123 I don't think your issue is related to this issue.
Your issue is related to UI rerendering of neo-tree, and I believe is caused only when expanding a directory for the first time.
Please make a new issue or please correct me if I'm wrong tho.

OP says there's high CPU usage when a large number of files are updated in the disk, (for example by compiling a project with cmake, a lot of files in build will be regenerated), and neo-tree tries to catch up to those updates. (right? @ghostbuster91)

This is understandable, and we might have to say this is an expected behavior with the current codebase, as neo-tree has to recreate the tree and rerender the whole buffer for each file update (debounced every 50 ms iirc).
And the performance becomes much worse if the directory is a git repo.

This is a big issue, but it is very difficult to fix at the same time. I'm doing a big rewrite and will incorporate with nvim-nio which will hopefully make the situation better, but it will take time.

from neo-tree.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.