trpc-openapi
trpc-openapi copied to clipboard
Performance is less than ideal, can't seem to figure out what causes it
3.8s was one of the fastest requests I had, locally, it usually takes 8 to 10 seconds
my request is defined as:
export const testRouter = router({
auth: protectedApiProcedure
.meta({ openapi: { method: "GET", path: "/test/auth" } })
.input(z.void())
.output(z.object({ status: z.string() }))
.query(async () => {
return {
status: "ok",
};
}),
});
protectedApiProcedure is:
Any guesses on what could be causing this?
are the underlying tRPC responses fast, and it's just trpc-openapi endpoints that are slow for you?
Prisma + serverless can be very slow due to cold starts in case that's applicable too