-
-
Notifications
You must be signed in to change notification settings - Fork 441
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
bug: default create-t3-turbo template is significant slower than create-t3-app #1279
Comments
create-t3-turbo/packages/api/src/trpc.ts Line 104 in ceb7e3c
|
trpc's overhead should be minimal, so unless there's something else that's taking time in your resolver it should be fast and definetely not slower than create-t3-app |
Do you have auth on both projects? |
Yes on both I use discord auth |
And both have middleware? |
Sorry I don't know what you mean by that. I have not added any additional middlerware. I am just using the out of the box discord auth, which means I have just added |
i mean does both apps have a |
only the t3-turbo app has a |
I debugged further and also added indexes to the I have created plenty of fresh DBs, played around with drizzle config and also created new fresh I’m still new to this stack-setup, so I can’t say much more at this point. If I find anything, I’ll keep you updated. In the meantime, is there an older branch I could check out that might not have this performance issue? |
middleware.ts will significantly add response time. you should make both dev env the same and as identical as possible. give reproducable repo if possible. |
Hi thanks for the answer. I just cloned both t3 repos ( The I have still no idea where this 1 additonal second of response time comes from :S I planned to provide a reproducable repo, but I wasn't able to use a local docker postgres with |
Provide environment information
System:
OS: macOS 14.6.1
CPU: (10) arm64 Apple M1 Max
Memory: 10.66 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.12.0 - ~/.local/state/fnm_multishells/11710_1735975103374/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.9.0 - ~/.local/state/fnm_multishells/11710_1735975103374/bin/npm
pnpm: 9.15.2 - /opt/homebrew/bin/pnpm
bun: 1.1.42 - /opt/homebrew/bin/bun
Watchman: 2024.09.30.00 - /opt/homebrew/bin/watchman
Describe the bug
🐛 Bug: t3-turbo API routes significantly slower than create-t3-app using the same Supabase setup
📝 Description
I've noticed a significant performance difference between the t3-turbo template and the create-t3-app template when interacting with the backend. Specifically, the
post.create
,post.all
andpost.getLatest
routes take 1 to 1.4 seconds in t3-turbo, whereas similar API routes in create-t3-app take around 300 to 650 ms.Update 11.Jan.2025 : Requests time are about 150ms for
create-t3-app
and 1000 -1300 ms forcreate-t3-turbo
when removing the artifical delay (both use the same supabase DB connection)Both projects were tested under similar conditions:
🖼️ Screenshots for Comparison
✅ create-t3-app
🐢 t3-turbo
To reproduce
Steps to Reproduce
create-t3-turbo
.post.create
andpost.all
tRPC routes using browser dev tools.create-t3-app
with the same database.The text was updated successfully, but these errors were encountered: