trpc/next very slow
I have set up my project using trpc/next and i have extremely slow queries, simple hello world taking around 1 full second on dev.
anyone experienced something like this before?
I've tried setting up my project with theo create-t3-app to compare and it's not even close, around 20ms.
I can share a repo later, but if someone has had this before and knows what's likely culprit, would be nice to hear from you
5 Replies
This is at runtime?
It’s probably your own code, nothing to do with tRPC
Likely database or 3rd party service slowness. Add some performance traces to measure times
If not could you share the codebase?
GitHub
GitHub - leadup-swe/ezly
Contribute to leadup-swe/ezly development by creating an account on GitHub.
i tried many things, removing database from context, removing middlewares, clerk (auth), making it as barebones as possible, and no luck
the simple hello world in src/server/router/projects/hello.ts takes 1 full second
Yeah there's a lot going on in that
You'll need to do some more experimentation here. It's very unlikely anything to do with Next or tRPC
Hooking up a debugger and record a trace/flamegraph with some added perf tracing calls might provide a lot of info