3 ms·
I’ve never used TRPC but curious to learn more about the slowdown. Is that a slowdown with Typescript or a runtime thing?
by emptysea 4y ago
I’ve never used TRPC but curious to learn more about the slowdown. Is that a slowdown with Typescript or a runtime thing?
- flybayer 4y agoSlowdown with Typescript and IDE completion. Not runtime.
- bluelightning2k 4y agoBy their own admission (or at least those of their advocates who I've paid attention to) tRPC isn't suitable for large projects. tRPC as I understand it basically serves definition files to the client using a clever misuse of Typescript - but over time that means Typescript has to conditionally evaluate every type in your app to find the correct one. Or something like that. My understanding of BlitzRPC from their documentation is it's more Svelte-like with the "everything is a magic compiler" philosophy. This may come with issues but it sounds pretty nice.
- flybayer 4y ago> with the "everything is a magic compiler" philosophy Blitz RPC has 1 minimal magic step, which is a webpack step to replace the resolver imports in client code with a fetch function and to add resolvers to the server-side API endpoint. And we'll be adding an API that lets you use Blitz RPC without webpack or any compile step.
- zamalek 4y agoThe slowdown occurs in the editor (red squiggles, autocomplete, etc.). tRPC relies heavily on TS inference, which the TS team strongly discourage due to performance concerns.