Prisma Just Got a Lot Faster

Sdílet
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

Komentáře • 118

  • @jadelasmar2435
    @jadelasmar2435 Před 10 měsíci +76

    That hoodie is drippy!! Where can I get that

  • @mikelCold
    @mikelCold Před 10 měsíci +69

    "Prisma Just Got a Lot Faster, but is still way slower than Drizzle/SQL"

    • @spicynoodle7419
      @spicynoodle7419 Před 10 měsíci +15

      JS was a mistake

    • @khazixfangirl6087
      @khazixfangirl6087 Před 10 měsíci +9

      @@spicynoodle7419 Few are realizing this

    • @TheDeprecatedLibrarian
      @TheDeprecatedLibrarian Před 10 měsíci +3

      @@spicynoodle7419 We're DOOM

    • @joshtriedcoding
      @joshtriedcoding  Před 10 měsíci +24

      True. Though to be fair, the compromise between performance and beginner-friendliness is more appealing now

    • @naveenarora6467
      @naveenarora6467 Před 10 měsíci +1

      @@spicynoodle7419 Oh no but I love it!!!
      P.S I'm a masochist

  • @adlerspencer
    @adlerspencer Před 10 měsíci +6

    Awesome, Josh! Exactly what I needed to hear about prisma. Tks

  • @ahmed.systems
    @ahmed.systems Před 10 měsíci +8

    Loving these explanations, Josh. Keep making good content like this!

  • @austincodes
    @austincodes Před 10 měsíci +16

    Prisma with Keysley as a query builder is my favorite way of doing things right now

    • @joshtriedcoding
      @joshtriedcoding  Před 10 měsíci +3

      That sounds really cool. Heard a lot of good about Kysely recently

  • @Teckstudio
    @Teckstudio Před 9 měsíci +1

    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. 🤕

  • @zaarmad
    @zaarmad Před 10 měsíci +3

    Informative as always. Thanks!

  • @walkingin6375
    @walkingin6375 Před 10 měsíci +2

    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.

    • @joshtriedcoding
      @joshtriedcoding  Před 10 měsíci +6

      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

  • @tylerbell4137
    @tylerbell4137 Před 7 měsíci +3

    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.

  • @marjot87
    @marjot87 Před 10 měsíci +5

    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.

    • @joshtriedcoding
      @joshtriedcoding  Před 10 měsíci +1

      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

  • @real23lions
    @real23lions Před 10 měsíci +4

    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.

    • @joshtriedcoding
      @joshtriedcoding  Před 10 měsíci +1

      That seems like a good plan. Not worrying about ORM / performance until you need to. Hopefully you'll reach that point soon enough

  • @kemekenneth
    @kemekenneth Před 10 měsíci

    Love your explanations 👍

  • @lucasfranzolin
    @lucasfranzolin Před 10 měsíci +1

    thanks for the updates mate! see ya

  • @angelsancheese
    @angelsancheese Před 10 měsíci

    Great! You’re a really hard worker. Keep it up! Thank you for the video

  • @AsToNlele
    @AsToNlele Před 10 měsíci +3

    The hoodie brings back childhood for sure 😄 My guess is you had the carpet as we all did

  • @buddy.abc123
    @buddy.abc123 Před 10 měsíci +3

    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

  • @blkgames1447
    @blkgames1447 Před 10 měsíci

    Yo, I really like your content. Keep going!! O7

  • @toki.mp3
    @toki.mp3 Před 10 měsíci

    Drizzle to the moon baby!

  • @alifbinhossain7699
    @alifbinhossain7699 Před 4 měsíci

    Great content! Btw, what is the the name of this digital canvas?

  • @brayhanvillalba1850
    @brayhanvillalba1850 Před 6 měsíci

    Hi, nice video! I'd like to know what app is that where you are drawing

  • @Stoney_Eagle
    @Stoney_Eagle Před 10 měsíci

    Love the hoodie!

  • @alexiskenalvarez3764
    @alexiskenalvarez3764 Před 10 měsíci

    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

  • @tefkah
    @tefkah Před 10 měsíci

    bro that hoodie is 🔥

  • @philheathslegalteam
    @philheathslegalteam Před 10 měsíci +4

    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.

    • @JohnoScott
      @JohnoScott Před 10 měsíci

      I think they will support edge deployments, otherwise they will lose their benefit as Drizzle continues to match their DX

    • @philheathslegalteam
      @philheathslegalteam Před 10 měsíci +1

      @@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.

    • @JohnoScott
      @JohnoScott Před 10 měsíci

      @@philheathslegalteam good tip. I will give the kysely-prisma plugin a go. I do want to use Prisma with Neon

  • @ghostlexly
    @ghostlexly Před 10 měsíci +10

    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 ..

    • @Akantor111222
      @Akantor111222 Před 10 měsíci +1

      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
      @Akantor111222 Před 10 měsíci

      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?

    • @ghostlexly
      @ghostlexly Před 10 měsíci +2

      @@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 ..

  • @alonsocaceda2500
    @alonsocaceda2500 Před 10 měsíci

    Danke, dass du es so geklärt hast wie du es geklärt hast! Weiter so Josh! You rock!

  • @Luxcium
    @Luxcium Před 10 měsíci +5

    How can I not say anything about that amazing hoodie 🎉🎉🎉🎉 well I will say it: this is one amazing hoodie 😅😅😅😅

  • @codinginflow
    @codinginflow Před 10 měsíci

    Bro that sweater is dope AF

  • @sjmahat98
    @sjmahat98 Před 10 měsíci

    how do initialize a project with next js, drizzle & lucia-auth?

  • @KendaBeatMaker
    @KendaBeatMaker Před 10 měsíci +1

    I Love Prisma!

  • @universtybooks5468
    @universtybooks5468 Před 10 měsíci

    Please, can you mention you monitor properties?Thank you

  • @isaacfink123
    @isaacfink123 Před 10 měsíci +1

    Are the schemas exactly the same? I have a feeling prisma adds more indexes by default

    • @neociber24
      @neociber24 Před 10 měsíci

      I never see that, You can just read the generated SQL migration file

  • @yunyang6267
    @yunyang6267 Před 10 měsíci +1

    how do prisma bring database and server closer. aren't the locations all set by choice when you deploy an applicatiion?

  • @nithinraj1428
    @nithinraj1428 Před 10 měsíci +3

    the DevExperience of prisma cant be matched with neither kysely or drizzle

    • @joshtriedcoding
      @joshtriedcoding  Před 10 měsíci +1

      They're not aiming to, either. They each have a very different purpose

  • @leularia
    @leularia Před 10 měsíci

    time to go back

  • @BeyondLegendary
    @BeyondLegendary Před 10 měsíci +4

    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.

    • @joshtriedcoding
      @joshtriedcoding  Před 10 měsíci

      Oh yeah there are pretty big differences

    • @peteregbujie
      @peteregbujie Před 10 měsíci

      Which do you prefer? Prisma is easier to use but I like the idea of using actual sql with drizzle.

  • @arinroday302
    @arinroday302 Před 10 měsíci

    nice hoodie bruv

  • @prashlovessamosa
    @prashlovessamosa Před 10 měsíci +1

    Your hoodie is so 🆒.

  • @tseringlama2146
    @tseringlama2146 Před 10 měsíci

    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

  • @zoki5388
    @zoki5388 Před 10 měsíci

    Cool hoodie

  • @emenikedaniel
    @emenikedaniel Před 10 měsíci

    Just use supabase for your baas or better still use drizzle as a better alternative to Prisma.

  • @wfl-junior
    @wfl-junior Před 10 měsíci

    awesome

  • @CaleMcCollough
    @CaleMcCollough Před 10 měsíci +4

    Still doesn't stop the cold start from Rust on Lambda a d Edge functions. That was a deal breaker for me.

    • @simonhartley9158
      @simonhartley9158 Před 10 měsíci +1

      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.

    • @CaleMcCollough
      @CaleMcCollough Před 10 měsíci

      @@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.

    • @CaleMcCollough
      @CaleMcCollough Před 10 měsíci

      ​@@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.

  • @lexsemenenko7044
    @lexsemenenko7044 Před 10 měsíci

    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.

    • @joshtriedcoding
      @joshtriedcoding  Před 10 měsíci +1

      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.

  • @vee.m
    @vee.m Před 10 měsíci +1

    which drawing app is that?

  • @d3c3
    @d3c3 Před 10 měsíci

    where i can buy this hoodie? pls tell me

    • @joshtriedcoding
      @joshtriedcoding  Před 10 měsíci

      honestly no idea where i got it from. But you can definitely buy these carpets and turn them into a hoodie yourself

  • @jamesnelson174
    @jamesnelson174 Před 10 měsíci

    Create a tutorial with it on nextjs and prisma

  • @Vann0001
    @Vann0001 Před 10 měsíci

    just realized there is color correction on the left side of the video

    • @joshtriedcoding
      @joshtriedcoding  Před 10 měsíci

      hmm i usually don't change the color of my videos, shouldn't be that way. Hopefully your monitor is not broken haha

  • @nketiahjoseph9675
    @nketiahjoseph9675 Před 10 měsíci

    Hello bro, how can i reach you

  • @musashi542
    @musashi542 Před 10 měsíci

    Did you go to college or just started freelancing without degree ?

    • @joshtriedcoding
      @joshtriedcoding  Před 10 měsíci

      Both actually, started freelancing while in university

  • @hernan7810
    @hernan7810 Před měsícem

    Do you sell Drizzle or what?

  • @Matt-lj2rx
    @Matt-lj2rx Před 10 měsíci +4

    Still do not see reason to use Drizzle tbh, 0 user base, terrible API and half the features compared to advanced prisma queries.

    • @peteregbujie
      @peteregbujie Před 10 měsíci

      Codedamn raised serious concern's about using Prisma. Drizzle is a great alternative but it has a long way to go.

  • @anandhukraju9382
    @anandhukraju9382 Před 10 měsíci +1

    Is it still lower than Drizzle?💀

    • @leularia
      @leularia Před 10 měsíci

      who care drizzle is slower than c++ ORM engine bro

    • @anandhukraju9382
      @anandhukraju9382 Před 10 měsíci

      @@leularia lmao

  • @LazyShady
    @LazyShady Před 10 měsíci

    Is Drizzle easy to learn?

    • @peteregbujie
      @peteregbujie Před 10 měsíci

      If you like messing with SQL then you are good.

  • @snk-js
    @snk-js Před 10 měsíci

    i laught on: 'is' (suppose to be 'was')

  • @Muescha
    @Muescha Před 10 měsíci

    nitpick: 05:22 -> 2,6 miliseconds should be 2,6 seconds

  • @Kats0unam1
    @Kats0unam1 Před 10 měsíci +1

    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 ?

    • @joshtriedcoding
      @joshtriedcoding  Před 10 měsíci +1

      The TypeSafety you get in return is worth a lot, though

    • @arupde6320
      @arupde6320 Před 9 měsíci

      @@joshtriedcoding it still can be data sanitizing . isnt it ?

  • @giorgos6576
    @giorgos6576 Před 10 měsíci +2

    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

    • @joshtriedcoding
      @joshtriedcoding  Před 10 měsíci

      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

    • @iukeay
      @iukeay Před 10 měsíci

      Bro it is horrible and feels so unneeded

  • @eihab
    @eihab Před 10 měsíci

    🚗🚙🏎️🚕🚓🚘🚖🚔🏁

  • @rod6722
    @rod6722 Před 10 měsíci

    B L A Z I N G L Y F A S T

  • @Luxcium
    @Luxcium Před 10 měsíci +2

    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 ❤