Then just before the Diffs release Linear held a team offsite in Iceland. I jumped on the plane, and for glorious 3 hours I had no AI and no Internet - and I figured it out.
Instead of asking how to get rid of the style recalcs and layouts, I started to wonder - why are they taking so long? Previously I assumed it's caused by the sheer number of elements that rendering the diffs added to the page, but I quickly disproved it. The browser is actually very fast, most of the time. Yes, the complex tree exaggerated the problem, but it was not the root cause for slowness.
It was slow CSS selectors. It quickly became apparent when I profiled with "CSS selector stats" on, and then disabled the top 10 slowest selectors.