You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I feel like it'd be fun to put an perf analysis of swapping rooms in a GH issue so here it is. I'll update this comment as I find more interesting things. The chosen benchmark will be swapping between rooms, specifically swapping from #riot-dev:matrix.orgto #riot:matrix.org (having viewed those rooms previously, paginating events in as such).
Observations; it takes about:
700ms in total.
20% of time to mount the middle panel, which mostly consists of mounting events. We already optimise for this by only mounting events that are at most on screen height's worth of distance away from the viewport. Events with read receipts in them take longer - it seems we mount RRs even if they're hidden behind the "+n". We should really only mount the ones that are visible by default.
10% to mount the member list. Nothing remarkable here, it takes a fair amount of time to unmount a bunch of member tiles and then mount the new ones.
6.5% to do forced re-layouts caused by:
Gemini mounting or
seemingly updating the contents of elements, such as when linkifying or
unmounting of elements (after which the re-layouts seem to occur).
5% to unmount the previous RoomView. IIRC, the RoomView needs to be remounted otherwise it'd need reimplementing. This could be because it's children (ScrollPanel) don't function unless the slate is totally wiped clean between rooms. Bearing in mind, most of this will be unmounting events.
4% to mount and unmount the composer, something we might be able to avoid entirely.
54.5% is probably "React" and of course the overheads of the react-perf itself.
Possible Optimisations
Reimplement RoomView to not mount on room-switch
This would remedy:
mounting Gemini unnecessarily (and therefore in theory reduce layout reflows),
the small amount of self-time taken by RoomView, TimelinePanel, MessagePanel and ScrollPanel to mount AND unmount.
Limit Read Receipts before mounting them
This would remedy:
unnecessarily mounting Read Receipts that are hidden initially.
The text was updated successfully, but these errors were encountered:
I feel like it'd be fun to put an perf analysis of swapping rooms in a GH issue so here it is. I'll update this comment as I find more interesting things. The chosen benchmark will be swapping between rooms, specifically swapping from
#riot-dev:matrix.org
to#riot:matrix.org
(having viewed those rooms previously, paginating events in as such).Observations; it takes about:
Possible Optimisations
Reimplement RoomView to not mount on room-switch
This would remedy:
Limit Read Receipts before mounting them
This would remedy:
The text was updated successfully, but these errors were encountered: