This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance of rendering a room with many hidden events (#10131)
* Test MessagePanel rendering with hidden events * Cache the results of shouldShowEvent in MessagePanel * Combine an event and its shouldShow info into a single object
- Loading branch information
1 parent
580857e
commit 102c4e5
Showing
3 changed files
with
98 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
test/components/structures/__snapshots__/MessagePanel-test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`MessagePanel should handle large numbers of hidden events quickly 1`] = ` | ||
<DocumentFragment> | ||
<div | ||
class="mx_AutoHideScrollbar mx_ScrollPanel cls" | ||
tabindex="-1" | ||
> | ||
<div | ||
class="mx_RoomView_messageListWrapper" | ||
> | ||
<ol | ||
aria-live="polite" | ||
class="mx_RoomView_MessageList" | ||
style="height: 400px;" | ||
/> | ||
</div> | ||
</div> | ||
); | ||
</DocumentFragment> | ||
`; |