Browser Performance – 10 Year Recall
If I recall correctly, in the Microsoft Foundation Classes (MFC)/.NET WinForm time frame, the ability to batch visual control updates using BeginUpdate() and EndUpdate() allowed software engineers to avoid certain rendering costs when making numerous changes to visual controls. Clearly the visual control batch method wasn’t the silver bullet to make all visual performance issues disappear. The software engineer was still required to code appropriately to batch appropriately the changes prior to making appropriate function calls onto a visual widget.
Back to websocket’s, and performance. There seem to be little data around that presents a view on consumption of incoming events off a websocket, coupled with marriage of events to visual widgets. Unsurprisingly, this again reminds me of the ways historically Java Swing/MFC/WinForm/WPF desktop applications of the “old” designed for performance. In particular, where thread access was provided, as much work on incoming streaming data was handled by a non UI thread. Reaching further upstream, it was not uncommon to find throttling/batching of data stream payloads to avoid flooding the user interface.
Throttling and batching in my mind provide different solution to solving the overall goal – to avoid the UI being flooded. Throttling is usually associated with restricting the number of updates per second to a certain number, e.g 5 per second. Throttling would normally drop certain updates outside of the throttle applied, but sill aim to ensure that the data sent from server to client within the throttle was the most up to date data. Throttling thus offers the net out of the web application only receiving a restricted number of updates, that when applied to the
Batching is a further optimization with regards to sending data from server to client. Specifically, if you have 10 widgets, each updating 3-7 times a second, this could mean a data payload being streamed per widget every 100mns or so, with appropriate DOM update. Possibly a better consideration would be to batch all widget updates that are available sent in a single payload from server to client every 200mns.
The downside of web development is still IE, as summarised by Computer World:
IE10 supports only Windows 8 and Windows 7, leaving Windows Vista stuck with IE9, just as Windows XP has been frozen at IE8.
The world will be a better place if corporations would move off Windows XP!
Final thought: Although people appears to love tables with lots of rows, we really need to assess the ROI of the data presented, and if the all the data needs to be in the web application all the time – paging?