Giter Site home page Giter Site logo

Comments (5)

alex-courtis avatar alex-courtis commented on May 10, 2024 1

Do you have any disk encryption active?

Unfortunately there's not much I can do here. Please do reopen if you can identify a reproducer.

from nvim-tree.lua.

alex-courtis avatar alex-courtis commented on May 10, 2024

That's a lot of filesystem events.

There have been and will continue to be issues when there are huge numbers of events such as #1931

There have recently been some file system and libuv performance / resource leak changes in neovim. You're running latest so they should be present.

Please provide a reproducer: I have not heard of lerna... full instructions on how I can set this up and reproduce would be gratefully appreciated.

from nvim-tree.lua.

johnmutuma5 avatar johnmutuma5 commented on May 10, 2024

Thanks Alex.

I've tried to repro this with simple directories.

I have a bash script to generate 2000 empty directories into a packages folder below, and follow the next steps:

  1. I create a new folder call it testing and cd into it
  2. I create a create_empty_dirs.sh file there
  3. Run chmod +x create_empty_dirs.sh in the terminal inside the testing directory
  4. Execute the script ./create_empty_dirs.sh. Once this succeeds, I have inside testing a packages directory with 2000 empty folders
  5. I open nvim from testing and open nvim-tree
  6. Locate the created packages folder in the tree and hit C-] to cd into packages
  7. NeoVim hangs for at least 30 seconds
  8. Once the operation is complete, I'm now inside packages
  9. Run NeoVim command :qa to exit NeoViim, it hangs once more for some about 30sec too before exit is done

I have reproduced this in 2 MacBooks: a 32GB Ram Intel Core i9, as well as a 64GB Ram Apple M1 Max. Both on macOS 13.4.1.

#!/bin/bash

# Function to create empty dirs inside a packages folder
create_directory() {
    local dir_name="packages/$1"
    mkdir -p "$dir_name"
}

# Main script
for ((i = 1; i <= 2000; i++)); do
    dir_name="package_$i"
    create_directory "$dir_name"
done

echo "2000 empty directories created."

from nvim-tree.lua.

alex-courtis avatar alex-courtis commented on May 10, 2024

Unfortunately I'm not able to replicate. I even created 100 files in each directory:

#!/bin/bash

# Function to create empty dirs inside a packages folder
create_directory() {
    local dir_name="packages/$1"
    mkdir -p "$dir_name"
}

create_file() {
    local file_name="packages/$1/$2"
        touch "$file_name"
}

# Main script
for ((i = 1; i <= 2000; i++)); do
    dir_name="package_$i"
    create_directory "$dir_name"
        for ((j = 1; j <= 100; j++)); do
                create_file "$dir_name" "$j"
        done
done

Log is quite sparse, with no action following the change dir:
nvim-tree.log

Have you got a linux machine you could test this on?

Is the testing contained inside a git repo?

from nvim-tree.lua.

johnmutuma5 avatar johnmutuma5 commented on May 10, 2024

Hello Alex.

The testing is not in a git repo.

I tested the lag in a Linux running inside Virtualbox and it seems to be performant in that environment. Looks like it's a macOS problem.

from nvim-tree.lua.

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.