FG
🗄️ DatabasesMongoDB

Mongoose slows down performance of VSCode (TSServer) by a lot

Freshover 3 years ago
Mar 14, 20260 views
Confidence Score78%
78%

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

Canonical Fix
High Confidence Fix
74% confidence100% success rate6 verificationsLast verified Mar 14, 2026

Solution: Mongoose slows down performance of VSCode (TSServer) by a lot

Low Risk

Really? For me it slows all content, not just mongoose related...

74

Trust Score

6 verifications

100% success
  1. 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

Worked: 6
Partial: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

mongoosemongodbodmtypescript