language-tools
language-tools copied to clipboard
Slow performance with Prisma extension when .prisma file is in root directory
Bug description
Since version 5.15.0, the extension runs very slowly whenever there is a .prisma file in the root directory of the project. Linting and formatting take more than 2 seconds to respond. However, when moving the .prisma file to any other folder, the running speed returns to normal.
How to reproduce
- Create a project with a .prisma file in the root directory.
- Use the extension to lint or format the file.
- Notice the delay in response (more than 2 seconds).
- Move the .prisma file to a different folder.
- Use the extension again and observe that the response time is normal.
Expected behavior
Linting and formatting should respond quickly even when the .prisma file is located in the root directory of the project.
Prisma information
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlserver"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
name String
email String @unique
posts Post[]
}
model Post {
id Int @id @default(autoincrement())
title String
content String?
published Boolean @default(false)
authorId Int
author User @relation(fields: [authorId], references: [id])
}
Environment & setup
- OS: Windows 11
- Editor: VSCode
- Editor version: 1.90.2 (system setup)
- Extension version: 5.16.0
This is happening to us as of version 5.14 of the extension. Staying on 5.13 preserves extension performance as normal.
Can confirm this is still a problem with v6.4.1 of the extension. Moving schema.prisma into my src folder avoids the issue.
- Cursor v0.45.14
- VSCode v1.96.2
- macOS Sequoia 15.2