mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
f2468f562d
This was noticed as a problem after `Unread.doesRoomHaveUnreadMessages` started being called a lot more frequently. Down the call stack, `shouldHideEvent` is called which used to call into the `SettingsStore` frequently, causing performance issues in many cases. The `SettingsStore` tries to be as fast as possible, however there's still code paths that make it less than desirable to use as the first condition in an AND condition. By not hitting the `SettingsStore` so often, we can shorten those code paths. As for how much this improves things, I ran some profiling before and after this change. This was done on my massive 1200+ room account. Before it was possible to see nearly 2 seconds spent generating room lists where 20-130ms per room was spent figuring out if the room has unread messages. Afterwards, the room list was generating within ~330ms and each unread check taking 0-2ms. There's still room for improvement on generating the room list, however the significant gains here seem worth it. |
||
---|---|---|
.. | ||
actions | ||
async-components/views/dialogs | ||
autocomplete | ||
components | ||
i18n/strings | ||
notifications | ||
rageshake | ||
settings | ||
stores | ||
utils | ||
wrappers | ||
ActiveRoomObserver.js | ||
AddThreepid.js | ||
Analytics.js | ||
Avatar.js | ||
BasePlatform.js | ||
CallHandler.js | ||
CallMediaHandler.js | ||
ComposerHistoryManager.js | ||
ContentMessages.js | ||
createRoom.js | ||
cryptodevices.js | ||
DateUtils.js | ||
DecryptionFailureTracker.js | ||
dispatcher.js | ||
email.js | ||
Entities.js | ||
extend.js | ||
FromWidgetPostMessageApi.js | ||
GroupAddressPicker.js | ||
groups.js | ||
HtmlUtils.js | ||
ImageUtils.js | ||
index.js | ||
IntegrationManager.js | ||
Keyboard.js | ||
KeyRequestHandler.js | ||
languageHandler.js | ||
Lifecycle.js | ||
linkify-matrix.js | ||
Login.js | ||
Markdown.js | ||
matrix-to.js | ||
MatrixClientPeg.js | ||
Modal.js | ||
Notifier.js | ||
ObjectUtils.js | ||
PageTypes.js | ||
PasswordReset.js | ||
PhasedRollOut.js | ||
phonenumber.js | ||
PlatformPeg.js | ||
Presence.js | ||
ratelimitedfunc.js | ||
Registration.js | ||
Resend.js | ||
RichText.js | ||
Roles.js | ||
RoomInvite.js | ||
RoomListSorter.js | ||
RoomNotifs.js | ||
Rooms.js | ||
RtsClient.js | ||
ScalarAuthClient.js | ||
ScalarMessaging.js | ||
SdkConfig.js | ||
shouldHideEvent.js | ||
Skinner.js | ||
SlashCommands.js | ||
stripped-emoji.json | ||
TextForEvent.js | ||
Tinter.js | ||
ToWidgetPostMessageApi.js | ||
UiEffects.js | ||
Unread.js | ||
UserActivity.js | ||
UserAddress.js | ||
UserSettingsStore.js | ||
VectorConferenceHandler.js | ||
Velociraptor.js | ||
VelocityBounce.js | ||
WhoIsTyping.js | ||
WidgetMessaging.js | ||
WidgetMessagingEndpoint.js |