ghcjs / jsaddle

JavaScript interface that works with GHCJS or GHC
118 stars 63 forks source link

Performance Tests and Optimizing #30

Open hamishmack opened 7 years ago

hamishmack commented 7 years ago

It would be nice to have some simple performance tests. In particular it would be good to be able to identify where the bottle necks are on the with the different runners.

Then we can see what changes are worth making for the sake of performance. For instance is it worth reducing the size of JSON by using shorter names? Should we avoid recomputing JSON for the last async batch when sending a sync batch?

dfordivam commented 4 years ago

I have implemented a couple of simple tests here https://github.com/dfordivam/jsaddle-stress-tests Though they currently need to be run in interactive mode, and one of the test need an external server (for websocket messages).

I am also interested in doing optimizations so that the jsaddle-wasm code is able to run better, ie have lower latency and higher throughput. One idea is to get rid of aeson/JSON, and implement hand-written instances with use of integers directly.