Prisma Just Got a Lot Faster
Vložit
- čas přidán 12. 07. 2023
- The biggest problem of Prisma has always been their cold starts. Around 2.7 seconds to be exact. Pretty bad. In 5.0, they've managed to get that down to around 300ms - about 9x as fast.
Benchmark sources: github.com/drizzle-team/drizz...
Prisma 5.0 article: www.prisma.io/blog/prisma-5-f...
-- my links
Discord: / discord
My GitHub: github.com/joschan21 - Věda a technologie
That hoodie is drippy!! Where can I get that
dripping like a fish
shirtwascash
but isn't it too hot to wear a hoodie?
@@greendsnow yes, I put it on just for the video haha
@@joshtriedcoding LOL
"Prisma Just Got a Lot Faster, but is still way slower than Drizzle/SQL"
JS was a mistake
@@spicynoodle7419 Few are realizing this
@@spicynoodle7419 We're DOOM
True. Though to be fair, the compromise between performance and beginner-friendliness is more appealing now
@@spicynoodle7419 Oh no but I love it!!!
P.S I'm a masochist
Awesome, Josh! Exactly what I needed to hear about prisma. Tks
Loving these explanations, Josh. Keep making good content like this!
Appreciate ya man
Prisma with Keysley as a query builder is my favorite way of doing things right now
That sounds really cool. Heard a lot of good about Kysely recently
First: I really love your videos!!! 🤩Second: This time we seem to have a classical "How to lie with charts"-case: At around 2:00 your chart starts (without any reason) at 70 ms. So the 90 ms Drizzle needs look like 20 ms. Compared that to the "visually" 110 ms Prisma needs looks like a factor of six ... but in reallity its "only" factor two. Slower of course, but not nearly as slow as it looks! Feels a little biased. 🤕
Informative as always. Thanks!
Cheers man!
Hey Josh, I love your vids, been watching for a while, not commenting. Appreciate the stuff you put out, but I have always been curious around what age you are, and when you started to code? Anyway, keep up the great work. We are all glad for it.
Thanks for finally commenting man! Very happy to hear from ya. I'm 21 and started coding around February 2022. Not that long! Though to be fair, I feel like through this youtube thing and just curiosity I've managed to fit much, much more experience into that time frame than it might seem. One lucky day I happened to discover React, coming from WordPress and regular HTML/CSS. That was an absolute WOW moment. THIS is how it's done?! :D
I think they fixed the issue you were talking about in the end of your video in 5.4.0. They shipped a ton of performance improvements in that release.
Hey Josh, I really like your videos! I would be very happy about a video about Next-Auth with a Drizzle Adapter. I'm currently struggling with getting the types right for Session etc.
Cool idea! Not sure if there is an official one, but there is an unofficial one at the least! That would be interesting to get into
That hoodie brings back childhood memories 😂😂
Also good overview. I’ll still be using Prisma because it’s easy for a beginner solo dev. Will look at more ORMs after my site gets bigger.
That seems like a good plan. Not worrying about ORM / performance until you need to. Hopefully you'll reach that point soon enough
Love your explanations 👍
thanks for the updates mate! see ya
Great! You’re a really hard worker. Keep it up! Thank you for the video
Appreciate you man.
The hoodie brings back childhood for sure 😄 My guess is you had the carpet as we all did
aw hell yeah
I deploy on docker swarm cluster using a few VPSs. I don't suffer for cold starts. I cherish prisma's readability. I wish they fix the inefficient queries though. I use redis help there so not much of a problem. Drizzle looks great too but prisma for now for me
Yo, I really like your content. Keep going!! O7
Drizzle to the moon baby!
Great content! Btw, what is the the name of this digital canvas?
Hi, nice video! I'd like to know what app is that where you are drawing
Love the hoodie!
Hey Josh can you cover an example of how to operate relational tables without foreign keys? Because Planetscale doesnt support foreign keys :< I can't find an example with drizzle and how to properly operate without fks
bro that hoodie is 🔥
My only problem with Prisma is their lack of edge driver support. Planetscale uses HTTPS while Neon uses an OSS websocket proxy, which can make any Postgres DB, not just Neon into an edge compatible one.
Prisma supports neither unfortunately. And I don't think they'll be supporting anything either. Its against their business interest. They're pushing their Prisma Data Proxy instead.
I think they will support edge deployments, otherwise they will lose their benefit as Drizzle continues to match their DX
@@JohnoScott Well they do. You just gotta use their paid service to so do.
If I was a company I'd never move away from that.
Drizzle DX is fine, but their schema declarations are some of the worst.
Prisma has many advantages to use above Drizzle. For example being able to compile to different languages.
Thats what I'm doing in JS right now. I use kysely-prisma to auto generate my kysely client then plug in Neon's DB driver for edge support.
This is much much better than trying to read Drizzle schemas.
@@philheathslegalteam good tip. I will give the kysely-prisma plugin a go. I do want to use Prisma with Neon
For quick side projects it’s cool to use prisma, but I can’t imagine prisma in a production environment with big projects.. I will stay with typeorm for now and I hope prisma will get better and add more functionalities ..
We currently using TypeORM in production and wish that we started with Prisma because of its type system. What makes you think that Prisma is not ready for production?
We currently using TypeORM in production and wish that we started with Prisma because of its type system. What makes you think that Prisma is not ready for production?
@@Akantor111222 prisma has huge changes and good luck for upgrading when you have 80+ controllers, you have to use only one file of schema and it’s hard to maintain when you have 20+ entities on real production, it’s a new company and they are trying to make money with it, good luck on complex queries you don’t have a query builder and good luck on working with middleware’s and virtual fields ..
Danke, dass du es so geklärt hast wie du es geklärt hast! Weiter so Josh! You rock!
How can I not say anything about that amazing hoodie 🎉🎉🎉🎉 well I will say it: this is one amazing hoodie 😅😅😅😅
Haha thanks man
Bro that sweater is dope AF
thanks bro
how do initialize a project with next js, drizzle & lucia-auth?
I Love Prisma!
Please, can you mention you monitor properties?Thank you
Are the schemas exactly the same? I have a feeling prisma adds more indexes by default
I never see that, You can just read the generated SQL migration file
how do prisma bring database and server closer. aren't the locations all set by choice when you deploy an applicatiion?
This is specifically in their testing
the DevExperience of prisma cant be matched with neither kysely or drizzle
They're not aiming to, either. They each have a very different purpose
time to go back
You know they say all ORMs are created equal, but you look at prisma and look at drizzle and you can see that statement is not true.
Oh yeah there are pretty big differences
Which do you prefer? Prisma is easier to use but I like the idea of using actual sql with drizzle.
nice hoodie bruv
Your hoodie is so 🆒.
hello brother please make a video on (express js) backend and (next js ) frontend about "server side " filtering data and pagination not using server action
Cool hoodie
Just use supabase for your baas or better still use drizzle as a better alternative to Prisma.
awesome
Still doesn't stop the cold start from Rust on Lambda a d Edge functions. That was a deal breaker for me.
This was part of the improvements and by reducing dependencies and deleting old code there are significant gains here. Hopefully now fast enough for most people.
@@simonhartley9158 No, the Rust binary is 180MB and it makes the cold boot performance on AWS Lamda/edge Functions to be several seconds, which significantly jacks up your web hosting bill and makes a bad UX that causes users to click-off. Just a fraction of a second delay can cost you 10% or more of your user base. Prisma is for newbs who don't know what they're doing.
@@simonhartley9158 No, ORM doesn't even save you that much dev time and not being good at SQL query optimization will cost you clients and jobs. You need to be good with SQL, not just lazy and try to look stuff up on the job. Fast cold-boot times are a necessity for almost all websites. Multi-second cold-boot Lamba times are a deal breaker. Drizzle is strongly preferred over Prisma for this reason, and you should not be using JavaScript for any professional website.
I dedicated a significant amount of time to exploring Prisma and starting few large projects with it,; creating complex polymorphic relationships etc., I was considering a potential switch to Drizzle. This update has left me pleasantly surprised and reconsidering my decision.
Cheers man. I've had an awesome experience with both. Prisma has great DX, might hit scaling issues a bit before Drizzle. With Drizzle, you can really benefit from your certain sql dialect and it's edge compatible. Both are great, wouldn't worry about it too much.
which drawing app is that?
it's called excalidraw
where i can buy this hoodie? pls tell me
honestly no idea where i got it from. But you can definitely buy these carpets and turn them into a hoodie yourself
Create a tutorial with it on nextjs and prisma
just realized there is color correction on the left side of the video
hmm i usually don't change the color of my videos, shouldn't be that way. Hopefully your monitor is not broken haha
Hello bro, how can i reach you
Did you go to college or just started freelancing without degree ?
Both actually, started freelancing while in university
Do you sell Drizzle or what?
Still do not see reason to use Drizzle tbh, 0 user base, terrible API and half the features compared to advanced prisma queries.
Codedamn raised serious concern's about using Prisma. Drizzle is a great alternative but it has a long way to go.
Is it still lower than Drizzle?💀
who care drizzle is slower than c++ ORM engine bro
@@leularia lmao
Is Drizzle easy to learn?
If you like messing with SQL then you are good.
i laught on: 'is' (suppose to be 'was')
nitpick: 05:22 -> 2,6 miliseconds should be 2,6 seconds
good catch!
Regular SQL > ORMs.
Specially Javascript ORMs. Javascript ORMs are horrible compared to other languages. Is it that hard to keep Javascript out of the backend ?
The TypeSafety you get in return is worth a lot, though
@@joshtriedcoding it still can be data sanitizing . isnt it ?
So if you have 2 huge tables and want to call a join query, prisma will load them in memory and then the join happens? I mean if it's billions of rows you might run out of RAM. xD
prisma's engine is a black box that could explode anytime. Jokes aside though, it's open source, so if you're interested in how it actually works its out there for everyone to see
Bro it is horrible and feels so unneeded
🚗🚙🏎️🚕🚓🚘🚖🚔🏁
B L A Z I N G L Y F A S T
All the time he has put preparing his topic and those graphics… all that effort eclipsed by the enthusiasm and the charismatic energy and the communication skills 😅😅😅 well even the haircut all so perfectly optimized… 🎉🎉🎉 also the research and the knowledge about his topic makes me think that overall Josh’s channel is so underrated… Did he got some videos published on the Free Code Camp 🏕️ 🔥 it would offer so much visibility ❤