Open christianvuerings opened 1 week ago
Describe the bug
VSCode freezes when making a file change (create / rename / delete) in a repo with lots of tests.
To Reproduce Steps to reproduce the behavior:
git clone https://github.com/christianvuerings/vscode-jest-large-repo.git
cd vscode-jest-large-repo; code .
src/main.js
src/main_renamed.js
mv src/main.js src/main_renamed.js
Expected behavior VSCode doesn't freeze
Actual behavior VSCode freezes for 5-10 seconds
Screenshots If applicable, add screenshots to help explain your problem.
First part: shows freezing issue with 2 separate renames. Second part: renaming works smoothly without the VSCode Jest extension
https://github.com/user-attachments/assets/12033b73-72e2-4a4f-9754-7ac703b23b2c
Environment:
v6.4.0
node -v
v18.16.1
npm -v
yarn --version
9.5.1
Jest 29.7.0
None
on-demand
deferred
true
Mac OS 14.6.1
Prerequisite
Yes
Root directory of the project
npm run test
Additional context Add any other context about the problem here.
When debugging the root cause seems to be updateTestFileList: https://github.com/jest-community/vscode-jest/blob/fae16e86446379f907079dab9129041869d1c585/src/JestExt/core.ts#L744-L765
updateTestFileList
Which gets called on every file create, delete or rename https://github.com/jest-community/vscode-jest/blob/fae16e86446379f907079dab9129041869d1c585/src/JestExt/core.ts#L767-L775
If we comment out the contents of updateTestFileList everything works smoothly
Describe the bug
VSCode freezes when making a file change (create / rename / delete) in a repo with lots of tests.
To Reproduce Steps to reproduce the behavior:
git clone https://github.com/christianvuerings/vscode-jest-large-repo.git
cd vscode-jest-large-repo; code .
src/main.js
tosrc/main_renamed.js
:mv src/main.js src/main_renamed.js
Expected behavior VSCode doesn't freeze
Actual behavior VSCode freezes for 5-10 seconds
Screenshots If applicable, add screenshots to help explain your problem.
First part: shows freezing issue with 2 separate renames. Second part: renaming works smoothly without the VSCode Jest extension
https://github.com/user-attachments/assets/12033b73-72e2-4a4f-9754-7ac703b23b2c
Environment:
v6.4.0
node -v
:v18.16.1
npm -v
oryarn --version
:9.5.1
Jest 29.7.0
None
on-demand
None
deferred
totrue
Mac OS 14.6.1
Prerequisite
Yes
Root directory of the project
npm run test
Additional context Add any other context about the problem here.
When debugging the root cause seems to be
updateTestFileList
: https://github.com/jest-community/vscode-jest/blob/fae16e86446379f907079dab9129041869d1c585/src/JestExt/core.ts#L744-L765Which gets called on every file create, delete or rename https://github.com/jest-community/vscode-jest/blob/fae16e86446379f907079dab9129041869d1c585/src/JestExt/core.ts#L767-L775
If we comment out the contents of
updateTestFileList
everything works smoothly