Mongoose slows down performance of VSCode (TSServer) by a lot
Problem
Do you want to request a feature or report a bug? bug What is the current behavior? It slows down vscode by a lot, even with small projects. I have a very small project, with like 2 small schemas, and the 2 other files, containing on average 160 lines of code, and vscode slows down a lot as soon as I install mongoose. This does not happen when I install most other libraries (haven't tested them all lmao). If I uninstall mongoose, it comes back and works perfectly normal. To clarify "slowing down" means that typescript language server needs 3-5 seconds to realise that I'm importing somethign invalid, and just vscode in general to realise I'm importing something that's never used takes around 2-4 seconds. Usually it happens in under a second so like.. you know... And it's not like vscode is taking a lot of ram/cpu either, it just grows slow. Btw I think this is a mongoose issue, since it happens with no other library, its a special case here Reloading typescript server or project doesn't help If the current behavior is a bug, please provide the steps to reproduce. Have vscode to edit your code Install mongoose on your current project (`npm i mongoose` My tsconfig.json: [code block] What is the expected behavior? It to not be like this, lmao. What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.* Node: v16.2.0 Mongoose: 5.12.13 Linux: 5.12.7-arch1-1
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Mongoose slows down performance of VSCode (TSServer) by a lot
Really? For me it slows all content, not just mongoose related...
Trust Score
6 verifications
- 1
Really? For me it slows all content, not just mongoose related...
Really? For me it slows all content, not just mongoose related...
Validation
Resolved in Automattic/mongoose GitHub issue #10349. Community reactions: 22 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep