Giter VIP home page Giter VIP logo

Comments (14)

rouge8 avatar rouge8 commented on July 19, 2024

I was able to reproduce it in the Django repo: https://recordit.co/xMyHPQATnE My guess is it's something to do with the number of tests or files in the project...

from neotest.

rouge8 avatar rouge8 commented on July 19, 2024

It looks like adapter.discover_positions() is called on ~every test file in the repo, I wonder if that's related...

from neotest.

stevearc avatar stevearc commented on July 19, 2024

Likely the same issue I had with large repos in #13. Try setting discovery.enabled = false. You lose the ability to see and run all tests, but it should fix the perf issue.

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

I've done a quick check myself and didn't see any slowdown with running other than a lot renders when the summary window was open (which should be fixed now). Is it just fzf that slows down or the entire Neovim instance?

It looks like adapter.discover_positions() is called on ~every test file in the repo, I wonder if that's related...

Can you open the summary window instead of running tests to see? This will isolate discovery from running tests.

I also had pyright absolutely tank my instance while processing, can you double check LSP isn't slowing things down as well?

from neotest.

rouge8 avatar rouge8 commented on July 19, 2024

Is it just fzf that slows down or the entire Neovim instance?

The entire Neovim instance is slow while the test runs, but the FZF window is still slow after it finishes.

Can you open the summary window instead of running tests to see? This will isolate discovery from running tests.

Opening FZF after the test summary is a little slow, maybe 1-2 seconds, but not as slow as after the tests.

I also had pyright absolutely tank my instance while processing, can you double check LSP isn't slowing things down as well?

After stopping the LSP with :LspStop and running Neotest on the nearest test, FZF takes 4-5 seconds to open.

from neotest.

rouge8 avatar rouge8 commented on July 19, 2024

Likely the same issue I had with large repos in #13. Try setting discovery.enabled = false. You lose the ability to see and run all tests, but it should fix the perf issue.

This seems to fix the issue.

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

OK I'll close this then as it seems to be as it's the same underlying issue 👍

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

May have spoken too soon on this being the same issue. I noticed a slow down due to the diagnostic consumer when tests completed. I've fixed it in the latest commit if you want to see if that helps

from neotest.

rouge8 avatar rouge8 commented on July 19, 2024

Hmm nope, the FZF terminal still takes 10-15 seconds to open after running a test once I re-enable discovery.

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

I was thinking you were using the neotest-python adapter with django but then remembered django has it's own test runner. Are you using neotest-vim-test instead?

from neotest.

rouge8 avatar rouge8 commented on July 19, 2024

I was using pytest to run the Django tests. I also use pytest in the work project.

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

Can you share how to do that? I've no experience with Django and a quick skim of the docs aren't very helpful 😅

from neotest.

rouge8 avatar rouge8 commented on July 19, 2024

Oh, I misremembered! It didn't actually discover any tests, but that was still enough to reproduce the issue as you can see in the recording I posted above.

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

OK that makes more sense thanks 👍

from neotest.

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.