pg_gather
pg_gather copied to clipboard
Multiple times of page rendering causing CPU spikes in browser.
When the Report is loaded, First HTML DOM with CSS is displayed as it is. The analysis data comes later on top of that. Currently, jquery is used to manipulate the DOM by using CSS for highlighting and Mouseover hints (element.title) are directly inserted into the DOM elements. All these dynamic changes result in Rendering the HTML page multiple times in the browser, causing CPU usage spikes and sometimes delays. This problem is more visible when the report is big in size.
One feasible solution is to hold the rendering until the DOM is fully ready with all modifications to highlight the analysis. Wait for all jquery action on the elements.
The delayed rendering patches are pushed to dev templates commit : 5cca672105ba1b015c79c064e9f32888b2e7c386 Currently under testing. Showing considerable performance gains and much less CPU utilization. Planning to merge with the main script in a week