2 ms·
Yesterday I wrote a webpage with a bootstrap template. The webpage has a progress bar that is updated in realtime by a websocket. The webpage is extremely slow.
by billconan 10y ago
Yesterday I wrote a webpage with a bootstrap template. The webpage has a progress bar that is updated in realtime by a websocket. The webpage is extremely slow. I guess every bit of progress bar update it rerenders the entire dom tree.
I don't think react would do much better, but I will have to try.
- billconan 10y agowhy did this get down voted? I can't understand.
- Guillaume86 10y agoWith a decent implementation, a progress bar will run at 60 fps no problem. You don't need react for a simple progress bar either, just check no unnecessary is done (probably just need to update the width on an element) and use requestAnimationFrame if you receive updates at very high rate.
- billconan 10y agoI admit I'm not familiar with frontend development. I used this template https://github.com/secondtruth/startmin https://github.com/secondtruth/startmin I noticed that boostrap progress bar is a div, https://www.w3schools.com/Bootstrap/bootstrap_progressbars.asp https://www.w3schools.com/Bootstrap/bootstrap_progressbars.a... that's why I guess updating it triggers dom update. I'm still looking for a solution.