When loading User ID reports with several thousand rows (For example 3k-10k rows) the report generation in the browser causes very high system resource usage on the device loading the report.
For example an matomo server that has a User ID row limit of 10,000 and selecting the row limit in the UI to "All" takes anywhere from 3-6 minutes (or more) to generate the report in the browser. During this time, that browser tab uses for example 3gb+ of RAM and presents the popup "Browser tab is unresponsive"
I think we're seeing this also in flattened page url reports etc.
We'd want to reproduce this, and then possibly check in what version this regressed if it did regress at all. Or if it's done quicker we could fix it directly.
Below a profile.
Back in the days we had to do column highlihting etc using JS. Not sure if that's still needed now that we don't support certain browsers anymore.
@tsteur I've reproduced this on a local dataset with ~6,800 user ids.
It takes 151 seconds to fully render the user id report using almost 4gb of memory for the browser tab (firefox).
Browser profiling shows that 98 seconds (~65%) of the total time is spent on the dataTable.js::handleColumnHighlighting() method.
To confirm this I added a return statement at the top of the handleColumnHighlighting() method which reduced the total report rendering time to 69 seconds using less than 2gb tab memory.
handleColumnHighlighting() is setting column width (via iterating over rows!) and handling row highlighting with mouseenter and mouseleave events. Disabling the method doesn't appear to make any difference to column highlighting or column widths they are being handled by CSS.
I'll create a PR to remove this method entirely and will do some browser testing with the minimum supported browsers for Matomo v4.6.0
👍 be good to potentially also check if we can make the ellipsis work with pure CSS (assuming they take also like 30% of the CPU for you) these days but I believe this method by now does a lot more maybe not just to make ellipsis work.