[Tutorial] How to measure a table's memory byte size

Fyi you don’t need to use a buffer, you can just #encodedJson since each character is a byte anyway

Also, the actual runtime size of a table can’t be measured like this, you have to account for alignment bytes tag bytes yadayadayada but if you just want to measure the size your table would be in a datastore/for http requests this is actually a good method since datastores use json for storage and http requests use json just in general

(Also also, you should put this in Community Tutorials since it’s a tutorial)

1 Like