-
Notifications
You must be signed in to change notification settings - Fork 91
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
Find Performance Bottleneck #68
Comments
This project might be suffering from "death by a thousand cuts", aka there are a whole bunch of statements that in itself might not be very costly but it adds up.
|
We've addressed this in tRPC by allowing different data transformers for upstream and downstream; upstream (client to server) are usually small payloads parsed by the server that needs to be secure and downstream are usually bigger payloads parsed by the client. |
That's a good idea! Still, I'm pretty sure there should be a way of speeding up SuperJSON to better compete with devalue. But I haven't found it yet 🤷♂️ |
Some ideas, algos isn't really my speciality, so these are mostly novice common sense
For inspiration, you can look at https://github.com/yahoo/serialize-javascript where they have the |
isSymbol() —> getType()Lines 43 to 44 in 0130a80
Lines 1 to 2 in 0130a80
PerformanceComparison to
|
SuperJSON is somewhat slow - at least compared to not using SuperJSON. Our code currently is written for readability first, and not so much for optimal performance.
The text was updated successfully, but these errors were encountered: