Skip to content

MR Page incremental rendering

Tim Zallmann requested to merge tz-mr-incremental-rendering into master

What does this MR do?

It renders the MR page incremental so the perceived performance is much better. On load all diffFiles get a property renderIt which is set to false. Also we cap the initially rendered lines to max 2000 (of course stuff can be expanded, etc.).

Based on that we show a loading indicator and then through the use of requestAnimationFrame + requestIdleFrame we use then the next spot to set one by one file to actually render their diff's. I have seen with a 5000 line MR already visible interaction after 60ms. As we also use way less memory at once there are less garbage collections and its way faster.

Are there points in the code the reviewer needs to double check?

Does everything on the MR page still work.

Why was this MR needed?

So the actual + perceived performance is much faster.

Screenshots (if relevant)

2018-08-07_11-21-36

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Edited by Tim Zallmann

Merge request reports