Re:VS Code uses 13% CPU when idle due to blinking cursor ren...
by scriptproof on Thursday March 23, 2017 @12:37PM
(#13941367)
There is an HTML 5 progress tag supported by all browsers: <progress id="" max=100>
Re:VS Code uses 13% CPU when idle due to blinking cursor ren...
by jinglebells on Thursday March 23, 2017 @03:59PM
(#13943656)
Can you buffer the incoming websockets data and only update at a small percentage of the inputs or maybe based on time?
Lodash has a debounce function which is useful to throttle UI features hooked to incoming data. https://css-tricks.com/debouncing-throttling-explained-examp...
You never really want the UI repaint to be dictated by data, it's better to use timers.
I made a webpage based on a bootstrap template
On this webpage, I have 2 realtime components. one is a chart, based on dygraphs
the other component is a bootstrap progressbar.
the bootstrap progressbar is made by html divs:
https://www.w3schools.com/Bootstrap/bootstrap_progressbars.a...
Both components are updated in realtime by a websocket.
I noticed that the chart by itself is very fast. But as soon as the progressbar is added, the entire webpage and even the entire machine becomes very slow. I guess this is because every bit of progressbar update, the browser rerender the entire page, as the progressbar is a div.
I don't know how to solve this. I thought about using react for its virtual dom. but if eventually I need to update the dom, the speed seems to be the same.