Comments (14)
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.
It looks like adapter.discover_positions()
is called on ~every test file in the repo, I wonder if that's related...
from neotest.
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.
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.
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.
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.
OK I'll close this then as it seems to be as it's the same underlying issue 👍
from neotest.
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.
Hmm nope, the FZF terminal still takes 10-15 seconds to open after running a test once I re-enable discovery.
from neotest.
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.
I was using pytest to run the Django tests. I also use pytest in the work project.
from neotest.
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.
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.
OK that makes more sense thanks 👍
from neotest.
Related Issues (20)
- [QUESTION] Is FixCursorHold.nvim still required? HOT 1
- Thoughts on why there is no support for Kotlin HOT 2
- New Adapter: Julia
- [QoL suggestion] Make adapter test discovery errors discoverable/survivable
- nio and busted? HOT 2
- [BUG] NerdFonts `v3` broke the `mdi-test-tube` icon for neotest in nvim-notify HOT 4
- Crash possibly related to neotest when using it with Rust inside a workspace
- [BUG] lua/neotest-dotnet/strategies/netcoredbg.lua:62: attempt to index field 'dap' (a nil value) HOT 2
- [BUG] neotest adds 3 seconds of startup time to neovim
- [BUG] Rust debugging issue
- [BUG] Watcher fails to find the lsp client after update to latest neotest with nio HOT 4
- [BUG] language name error when running any type of python test HOT 1
- [BUG] Cannot run nearest test or all tests from file HOT 6
- [BUG] Doing `gF` inside `neotest-output` floating window opens the file in same float
- [BUG] nested_tests causes test output from stdout/stderr to be printed undesirably
- [BUG] Files containing no tests shouldn't show up in summary
- [BUG] subprocess fails on non-default environments HOT 1
- Passing additional test arguments to runner HOT 1
- Feature Request: Set Notification Levels
- [BUG] Getting error "Future already set" and output_panel is empty for python tests HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neotest.