drizzle-orm icon indicating copy to clipboard operation
drizzle-orm copied to clipboard

Decrease the amount of generated TS types (performance issues)

Open dankochetov opened this issue 2 years ago • 5 comments

Based on Discord conversation https://discord.com/channels/1043890932593987624/1095436601426972822/1095436601426972822

dankochetov avatar Apr 11 '23 22:04 dankochetov

I'm also experiencing this issue. It makes drizzle impossible to work with tPRC in a midsize project.

pedropmedina avatar Apr 23 '23 04:04 pedropmedina

I'd like to chime in here with the same issue - I'm working in a monorepo with drizzle and zod both (no trpc fyi), and with 7 schemas and ~88 total columns, intellisense takes up to 10s to load up (32gb ram, ryzen 9 5900hs). I think performance issues might be pretty important before the project (i.e. drizzle) gets too big 😅

arpadgabor avatar May 11 '23 07:05 arpadgabor

I've started to have these problems with just 20 tables, maybe 10-15 columns each.

ngregrichardson avatar May 15 '23 05:05 ngregrichardson

Coming back to check on this again, is anyone using this library on production already? And do they have more than 20 tables? If yes, how do they workaround the slow intellisense issue? Would be really great if we can get some insights here. So far, I'm only seeing lots of YouTubers and tweets talking about how better drizzle is, but it seems all those are just doing a small demo showcase which isn't really practical. Thanks!

cayter avatar May 23 '23 09:05 cayter

Same here, I have ~85 tables and Intellisense is suuuper slow in VS Code.

cat-ninja avatar May 28 '23 17:05 cat-ninja

Same. 45 tables. Neovim running tsserver is quite painful.

I'm on hold moving my project until this dx is improved.

briangwaltney avatar Jun 14 '23 08:06 briangwaltney

+1 here. Experiencing same issue.

Only have about ~10 tables, and the intellisense is really-really slow.

hisamafahri avatar Jun 18 '23 15:06 hisamafahri

same here, 5~6 tables and already really slow, tried using the as string approach discused on Discord, but that breaks relations, I've removed it from some tables and then the performance was down again

gabrielsch avatar Jun 19 '23 14:06 gabrielsch

+1 :: 25 tables/<15 columns in a monorepo, trpc, zod on m1 mbp/16gb: vscode struggles and the ts server often crashes

atanaskanchev avatar Jun 21 '23 15:06 atanaskanchev

Update from the Drizzle team: Tweet "We'll make it a priority on Jul"

ESchouten avatar Jun 22 '23 19:06 ESchouten

+1

mdkq avatar Jun 23 '23 18:06 mdkq

How are people using drizzle with typescript running this slow? I keep seeing new projects and I feel like I am doing something wrong because in my experience drizzle is completely useless for a medium sized project

isaacfink avatar Jul 02 '23 02:07 isaacfink

How are people using drizzle with typescript running this slow? I keep seeing new projects and I feel like I am doing something wrong because in my experience drizzle is completely useless for a medium sized project

My best luck has been with Webstorm with 8 or more gigs of ram. I have a project with about 15 tables, <15 cols each

ngregrichardson avatar Jul 02 '23 02:07 ngregrichardson

Same here. I'm working with 15+ tables with around 10 columns each and multiple relations. my intellisense and typescript server crashes frequently.

darkliyznyanlin910 avatar Jul 03 '23 17:07 darkliyznyanlin910

I'd like to chime in here with the same issue - I'm working in a monorepo with drizzle and zod both (no trpc fyi), and with 7 schemas and ~88 total columns, intellisense takes up to 10s to load up (32gb ram, ryzen 9 5900hs). I think performance issues might be pretty important before the project (i.e. drizzle) gets too big 😅

bump it up to 128gb of ram

masterbater avatar Jul 06 '23 05:07 masterbater

Well I guess I will hold off on migrating to drizzle, fearing it will be a waste of time if I can't work on the project once implemented 🫤

seb-lewis avatar Jul 17 '23 22:07 seb-lewis

We've picked https://github.com/drizzle-team/drizzle-orm/issues/800 issue to be a tracking issue, so will close this on favour of #800

AndriiSherman avatar Jul 23 '23 18:07 AndriiSherman