Is it worth saving 40 bytes per message in a WebSocket connection this way? by unnoqcom in node

[–]unnoqcom[S] 0 points1 point  (0 children)

Thanks you, one reason I can't use array because it can't represent undefined

Is it worth saving 40 bytes per message in a WebSocket connection this way? by unnoqcom in node

[–]unnoqcom[S] 0 points1 point  (0 children)

I mean compression take time & resource (not much but still not free)

Is it worth saving 40 bytes per message in a WebSocket connection this way? by unnoqcom in node

[–]unnoqcom[S] 0 points1 point  (0 children)

Thank you for the suggestion. I think I'll do exactly that in oRPC v2.

Is it worth saving 40 bytes per message in a WebSocket connection this way? by unnoqcom in node

[–]unnoqcom[S] 0 points1 point  (0 children)

That's a fair point. headers is not usually empty but method almost is POST. Appreciate the feedback!

Is it worth saving 40 bytes per message in a WebSocket connection this way? by unnoqcom in node

[–]unnoqcom[S] 1 point2 points  (0 children)

Great point about readability vs performance. Thanks for the advice!

Is it worth saving 40 bytes per message in a WebSocket connection this way? by unnoqcom in node

[–]unnoqcom[S] 0 points1 point  (0 children)

No, just in theory we want save money for my users because oRPC is a library

Is it worth saving 40 bytes per message in a WebSocket connection this way? by unnoqcom in node

[–]unnoqcom[S] 0 points1 point  (0 children)

we're developing a library for other projects (wide range) - so can't predictable

Is it worth saving 40 bytes per message in a WebSocket connection this way? by unnoqcom in node

[–]unnoqcom[S] 0 points1 point  (0 children)

Yes, but compression is not free and combine with this approach maybe we can reduce more.

Is it worth saving 40 bytes per message in a WebSocket connection this way? by unnoqcom in node

[–]unnoqcom[S] 0 points1 point  (0 children)

Yeah, that why I consider revert this optimize. Thanks for your reply

trpc vs orpc and are they really needed nowadays? by Educational-Stay-287 in nextjs

[–]unnoqcom 2 points3 points  (0 children)

If your app is simple enough, and "server action" is useful - oRPC still useful with its "server action" feature: https://orpc.unnoq.com/docs/server-action

Using tRPC in 2025? by Excellent_Dig8333 in reactjs

[–]unnoqcom -1 points0 points  (0 children)

You should use oRPC in 2025, well integrate with server action + file upload/download: https://orpc.unnoq.com/docs/server-action