lucia-auth / lucia

Authentication, simple and clean
https://lucia-auth.com
MIT License
8.32k stars 447 forks source link

[Bug]: Typescript performance issue #1591

Closed lab-do closed 3 weeks ago

lab-do commented 3 weeks ago

Package

lucia

Describe the bug

I noticed significant performance issues with TypeScript when using Lucia., which are causing the IDE to become extremely slow.

Steps to reproduce:

  1. Clone repo
    git clone https://github.com/SikandarJODD/Auth-Lucia
  2. comment DATABASE_URL import inside Auth-Lucia/src/lib/server/db.ts
  3. Generate performance tracing
    npx tsc --noEmit --incremental false --generateTrace tracing
    npx @typescript/analyze-trace tracing/
lab-do commented 3 weeks ago

This was caused by using DrizzleSQLiteAdapter from @lucia-auth/adapter-drizzle with drizzle-orm/libsql

I switched to LibSQLAdapter from @lucia-auth/adapter-sqlite and that fixed my issue.