Closed copy closed 6 years ago
Thanks for the suggestion. Implemented in #14. Can you confirm that PR/branch improves the situation for your application?
Thanks for the suggestion. Implemented in #14. Can you confirm that PR/branch improves the situation for your application?
Yes, this significantly improves the performance. Thanks for the quick fix!
Thanks for the confirmation. Merged!
I'm writing an application that receives updates from a server very frequently. These are injected as messages using
Vdom_blit.process
. I noticed thatVdom_blit
calls the view function very often, even multiple times per millisecond, I'm guessing after every message, which causes a high cpu usage. Instead, the view function and dom updates should be throttled, preferably using requestAnimationFrame to align with the browser's refresh rate and to avoid input lag.As a simpler workaround, it would be useful if ocaml-vdom provided a way to send multiple messages at once, so I can queue up external messages and batch-send them myself.