This is just for needs of making an embed functionality (like Issue #15). If I wanted to make an IFrame, it would need to pass the save file to the url, however the current size is too big for that (about 9-10kB for 30 components). I did some optimizations of the variable names(make them 1-3 characters long) and few tweaks, but only managed to get it to little more than half of its original size (still about 5kB for just 30 components).
I also tried:
Protobuf: doesnt work, since options are unstructured, there can be anything from int to object, this just doesnt work (I don't know if I could even pass it to url)
BSON: I couldn't get it to run, as far as I know, it doesn't work in browser
After all of this, there is still a problem with the need of base64 encoding for the url parameter... which make the size about 30% bigger. In the end, the "url parameter ready" save file would have about 6.5kB for board with 30 components. Which is terrible...
If you have any suggestions or tips, please share them in the comments. My goal is to get the size as low as possible, let's say about 3-4kB for 30 components.
This is just for needs of making an embed functionality (like Issue #15). If I wanted to make an IFrame, it would need to pass the save file to the url, however the current size is too big for that (about 9-10kB for 30 components). I did some optimizations of the variable names(make them 1-3 characters long) and few tweaks, but only managed to get it to little more than half of its original size (still about 5kB for just 30 components).
I also tried:
After all of this, there is still a problem with the need of base64 encoding for the url parameter... which make the size about 30% bigger. In the end, the "url parameter ready" save file would have about 6.5kB for board with 30 components. Which is terrible...
If you have any suggestions or tips, please share them in the comments. My goal is to get the size as low as possible, let's say about 3-4kB for 30 components.