Improvement on loading time for big json content
Brought to you by:
marabesi
Originally created by: marabesi
Currently json content that is around 1.2mb or bigger makes the app to lag, sometimes being unresponsive.
The ideal behavior here would be to prevent any action if there is already a formatting action running. Besides, would be helpful to add a spinner to gives users feedback that the tool is working.
Originally posted by: marabesi
Might be related https://web.dev/off-main-thread/
Originally posted by: marabesi
I started to play around comlink https://github.com/GoogleChromeLabs/comlink and it offers and abstraction to use webworkers, the expose/wrap approach helps to remove the mental mode of sending messages and setting up the worker. Therefore, I could't manage to make it work with external libraries.
The goal is to run the json validation/formatting off the main thread, which now, blocks the application if the json is 40kbs+.