ts-proto icon indicating copy to clipboard operation
ts-proto copied to clipboard

Optimize bigint handling

Open stephenh opened this issue 1 year ago • 0 comments

Currently when using forceLong=bigint, protobuf.js still produces longs, and we convert to/from bigints by going through strings.

In theory we should optimize this to not use strings, by either leveraging some code from the longfn fork:

https://github.com/consento-org/longfn/blob/main/index.mjs#L654

https://github.com/consento-org/longfn/blob/main/index.mjs#L100

Or just waiting until protobufjs natively supports bigints.

stephenh avatar Dec 29 '22 16:12 stephenh