Giter Club home page Giter Club logo

Comments (6)

jinleileiking avatar jinleileiking commented on July 21, 2024
image

from nerdtree.

rzvxa avatar rzvxa commented on July 21, 2024

@jinleileiking interesting results, May I ask what other plugins are there in your config other than NERDTree? For example vim-devicons or the nerdtree-git-plugin? and may I have your profiling options?
This call takes a bunch of time because of being in a loop and getting called for every child node, I suspect that the actual bulk of the work happens in this line in the lib/nerdtree/path.vim line 664:

" FUNCTION: Path.refreshFlags(nerdtree) {{{1
function! s:Path.refreshFlags(nerdtree)
    call g:NERDTreePathNotifier.NotifyListeners('refreshFlags', self, a:nerdtree, {})
    call self.cacheDisplayString()
endfunction

Call to the refreshFlags listeners is for third-party plugins, for example, vim-devicons and nerdtree-git-plugin which update their internal state via this event. So the cost of each extra plugin is O(n).

from nerdtree.

rzvxa avatar rzvxa commented on July 21, 2024

You can also try using #1362, Setting g:NerdTreeLazyDirRefresh to 1 enables the lazy refresh functionality. In this mode, we don't refresh closed directories, We just mark them as dirty and refresh them once it is necessary.

from nerdtree.

jinleileiking avatar jinleileiking commented on July 21, 2024

Plug 'PhilRunninger/nerdtree-buffer-ops'

from nerdtree.

jinleileiking avatar jinleileiking commented on July 21, 2024

It seems this plugin cost a lot of CPU. I disable this plugin, works well

from nerdtree.

rzvxa avatar rzvxa commented on July 21, 2024

@jinleileiking I'm happy to hear that you've found the issue, Since it probably wasn't the original author's problem I'll leave this open.

from nerdtree.

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.