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

Upgrade Drizzle and Prisma to its latest versions #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rafaell-lycan
Copy link

@rafaell-lycan rafaell-lycan commented Jan 10, 2024

This PR aims to bring a more realistic comparison using the latest versions of both Prisma and Drizzle, as well as upgrading some of the dependencies of this repo such as Hono and more.

Prisma also includes a new preview feature called relationJoins since v5.7.x, which enables support for JOINs for relation queries, but I'm unsure if it should add it or not.

It closes #1

@@ -1,6 +1,6 @@
generator client {
provider = "prisma-client-js"
previewFeatures = ["referentialIntegrity", "fullTextSearch", "fullTextIndex"]
previewFeatures = ["fullTextSearch", "fullTextIndex"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to also add relationJoins feature which should make a perf difference

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@capaj done!

Copy link

@oljimenez oljimenez Mar 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rafaell-lycan because relationJoins is still in preview are not enabled by default in queries https://www.prisma.io/docs/orm/prisma-client/queries/relation-queries#relation-load-strategies-preview. So you need also to update all queries

@hansaskov
Copy link

Any reason why this is not merged?

@septatrix
Copy link

Any reason why this is not merged?

It seems like the Drizzle team is tackling a lot at the same time lately and understaffed/overworked recently. They are planning some internal changes/refactoring and likely a few other things behind the scenes which require a lot of work.

Sadly this leaves very little manpower for tying up loose ends everywhere else: Drizzle Kit is still not open sourced (it was initially planned for end of last year), some easy documentation issues are still not tackled (and cannot be contributed by the community because we cannot look inside Drizzle Kit), benchmark was supposed to get a comparison with TypeORM as well as support for SQLite, MySQL... which are all listed as coming soon (and have been for a while). This PR seems to suffer from the same circumstances.

@sorenbs
Copy link

sorenbs commented Mar 29, 2024

I ran the benchmark with the latest version of Prisma and found that Prisma and Drizzle perform nearly identically: #5

@jamesmck
Copy link

Any reason why this is not merged?

It seems like the Drizzle team is tackling a lot at the same time lately and understaffed/overworked recently. They are planning some internal changes/refactoring and likely a few other things behind the scenes which require a lot of work.

Sadly this leaves very little manpower for tying up loose ends everywhere else: Drizzle Kit is still not open sourced (it was initially planned for end of last year), some easy documentation issues are still not tackled (and cannot be contributed by the community because we cannot look inside Drizzle Kit), benchmark was supposed to get a comparison with TypeORM as well as support for SQLite, MySQL... which are all listed as coming soon (and have been for a while). This PR seems to suffer from the same circumstances.

Sorry bro, you ought to quit making excuses for them.

The Drizzle team put a "benchmark" out there professing the superiority of their product and whilst doing so, they are purposefully keeping older versions of the competitive library? In using this "strategy" they should have anticipated requests for updates.

In order to come across as a team with integrity, they ought to take the 10 mins it'll take to merge this PR. It's been open for months now. Either that, or they should put something up on the so called benchmark that lets the viewer know that they are purposefully not able to update the competitor library due to lack of time and therefore, the benchmark is stale; so that the viewer is made aware of facts.

@septatrix
Copy link

septatrix commented Mar 29, 2024

Sorry bro, you ought to quit making excuses for them.

My intention was not to make an excuse for them, instead I wanted to put things into perspective. I definitely agree with you. Due to the sudden success they have a plethora of feature request and want to please everyone which does not work. They bit of more than they can chew and are investing time into new fancy projects like Drizzle Studio while leaving the fundamentals behind. What astonishes me is that there has not been any comment from the @drizzle-team on this PR so far.

We currently have a project using Prisma ORM and planned to switch to Drizzle for several reasons (not only performance). However, the missing open-sourceness of Drizzle Kit is currently a show stopper for us. And with Prisma increasing their performance with the new experimental features there is one less reason for us to consider switching to a project which cannot get their basic priorities straight (or at least be more transparent about it!!).

@jamesmck
Copy link

the missing open-sourceness of Drizzle Kit is currently a show stopper for us

Yep, fully agree with you on this. Again, they've been repeatedly asked to comment on why drizzle-kit is not open source'd and it's been nothing but silence.... for months.

One has to wonder why the aversion to making drizzle-kit OSS... what is going on under the hood there? 🤔

Anywho, I hope they are listening and will react.

@AndriiSherman
Copy link
Member

Any reason why this is not merged?

Didn't check this repo until now. We will check PR's and merge

@AndriiSherman
Copy link
Member

Any reason why this is not merged?

It seems like the Drizzle team is tackling a lot at the same time lately and understaffed/overworked recently. They are planning some internal changes/refactoring and likely a few other things behind the scenes which require a lot of work.
Sadly this leaves very little manpower for tying up loose ends everywhere else: Drizzle Kit is still not open sourced (it was initially planned for end of last year), some easy documentation issues are still not tackled (and cannot be contributed by the community because we cannot look inside Drizzle Kit), benchmark was supposed to get a comparison with TypeORM as well as support for SQLite, MySQL... which are all listed as coming soon (and have been for a while). This PR seems to suffer from the same circumstances.

Sorry bro, you ought to quit making excuses for them.

The Drizzle team put a "benchmark" out there professing the superiority of their product and whilst doing so, they are purposefully keeping older versions of the competitive library? In using this "strategy" they should have anticipated requests for updates.

In order to come across as a team with integrity, they ought to take the 10 mins it'll take to merge this PR. It's been open for months now. Either that, or they should put something up on the so called benchmark that lets the viewer know that they are purposefully not able to update the competitor library due to lack of time and therefore, the benchmark is stale; so that the viewer is made aware of facts.

that's why this repo is open-sourced, so you can run benchmarks with any versions and queries you want

@AndriiSherman
Copy link
Member

Any reason why this is not merged?

It seems like the Drizzle team is tackling a lot at the same time lately and understaffed/overworked recently. They are planning some internal changes/refactoring and likely a few other things behind the scenes which require a lot of work.

Sadly this leaves very little manpower for tying up loose ends everywhere else: Drizzle Kit is still not open sourced (it was initially planned for end of last year), some easy documentation issues are still not tackled (and cannot be contributed by the community because we cannot look inside Drizzle Kit), benchmark was supposed to get a comparison with TypeORM as well as support for SQLite, MySQL... which are all listed as coming soon (and have been for a while). This PR seems to suffer from the same circumstances.

thanks!

@jamesmck
Copy link

jamesmck commented Apr 2, 2024

that's why this repo is open-sourced, so you can run benchmarks with any versions and queries you want

Clearly you miss the point being made...
Ofc, people can run their own benchmarks, however the PRs are about correcting potentially misleading information that you've put out there, which is also being carried forward in the repo itself.

Look, the point here is not to give you grief. People who are commenting are just asking you guys to do what seems like the right thing to do. In the end, what you do is up to you 😉

@AndriiSherman
Copy link
Member

that's why this repo is open-sourced, so you can run benchmarks with any versions and queries you want

Clearly you miss the point being made... Ofc, people can run their own benchmarks, however the PRs are about correcting potentially misleading information that you've put out there, which is also being carried forward in the repo itself.

Look, the point here is not to give you grief. People who are commenting are just asking you guys to do what seems like the right thing to do. In the end, what you do is up to you 😉

What information is potentially misleading?

@jamesmck
Copy link

jamesmck commented Apr 2, 2024

ok, I'll spell it out, but only cause you asked.

  1. The repo or the benchmark itself does not disclose how the graphs/charts are being built.
  2. The fact that you don't disclose that the "benchmark" is not running live (though it sure does pretend to do that), and that the graphs/charts are pre-canned output that can be run even when the viewers system is offline.
  3. You don't disclose in this repo or on your benchmark site that you're using a years old preview feature for Prisma. Openly stating that would give viewers an opportunity to draw their own conclusions regarding the usefulness of such a feature for the benchmark.

Perhaps you can incorporate these into the new version of your benchmark, now that you are "looking at this repo." 🙄

@AndriiSherman
Copy link
Member

ok, I'll spell it out, but only cause you asked.

  1. The repo or the benchmark itself does not disclose how the graphs/charts are being built.
  2. The fact that you don't disclose that the "benchmark" is not running live (though it sure does pretend to do that), and that the graphs/charts are pre-canned output that can be run even when the viewers system is offline.
  3. You don't disclose in this repo or on your benchmark site that you're using a years old preview feature for Prisma. Openly stating that would give viewers an opportunity to draw their own conclusions regarding the usefulness of such a feature for the benchmark.

Perhaps you can incorporate these into the new version of your benchmark, now that you are "looking at this repo." 🙄

  1. How the UI of benchmarks matters? It's just a representation of a results that you can run yourself if you don't believe our results
  2. Same as 1
  3. We have this information both in this repo and on site

This repo info about it
Drizzle version - https://github.com/drizzle-team/drizzle-benchmarks/blob/main/package.json#L41
Prisma version - https://github.com/drizzle-team/drizzle-benchmarks/blob/main/package.json#L38

Website info: https://orm.drizzle.team/benchmarks
image
You can see that we specified versions for both libraries

@AndriiSherman
Copy link
Member

AndriiSherman commented Apr 3, 2024

Also 5.1.1 and 0.28.2 were released 6 months ago and not "years" ago

image image

And as you can see, those releases were pretty much at the same time. So, we are using the same old versions for both libraries and didn't update them. Not because we chose an old Prisma version, but because we were occupied with other tasks for these six months and neglected to update this repository. We will complete everything we need to do and update this repository, adding more libraries and test cases

@sorenbs
Copy link

sorenbs commented Apr 3, 2024

Just to clarify one thing,

In my testing, I found that upgrading Prisma to the latest version increased the performance in this benchmark by only about 0.1x. The real improvement was removing the use of the full-text preview feature and replace it with a simple SQL query. That change improved performance on the order of 10x. After that change, Prisma and Drizzle are effectively performing the same in this benchmark.

You can see this change implemented here: https://github.com/drizzle-team/drizzle-benchmarks/pull/5/files#diff-9bf733829a3120ca160edb833b45d1b5652846283b22a7a8e32de02652b763baR29

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

Successfully merging this pull request may close these issues.

Update Prisma to latest version
8 participants