Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow performance with Prisma extension when .prisma file is in root directory #1774

Open
nuintun opened this issue Jun 25, 2024 · 1 comment

Comments

@nuintun
Copy link

nuintun commented Jun 25, 2024

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

  1. Create a project with a .prisma file in the root directory.
  2. Use the extension to lint or format the file.
  3. Notice the delay in response (more than 2 seconds).
  4. Move the .prisma file to a different folder.
  5. 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
@SheaBelsky
Copy link

This is happening to us as of version 5.14 of the extension. Staying on 5.13 preserves extension performance as normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants