element-web/src
Travis Ralston f2468f562d Speed up room unread checks by not hitting the SettingsStore so often
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.
2018-12-07 20:15:21 -07:00
..
actions Update MatrixActionCreators.js 2018-11-04 23:00:47 -07:00
async-components/views/dialogs Add an in-room reminder to set up key recovery 2018-12-07 14:13:02 -06:00
autocomplete eslint --fix src/ 2018-10-26 22:50:38 -05:00
components Add an in-room reminder to set up key recovery 2018-12-07 14:13:02 -06:00
i18n/strings Add an in-room reminder to set up key recovery 2018-12-07 14:13:02 -06:00
notifications eslint --fix src/ 2018-10-26 22:50:38 -05:00
rageshake Make rageshake use less memory 2018-10-15 15:23:44 +01:00
settings Add an in-room reminder to set up key recovery 2018-12-07 14:13:02 -06:00
stores Merge pull request #2330 from matrix-org/travis/fix-pinned-rooms 2018-12-07 17:44:36 +00:00
utils Merge branch 'develop' into travis/invite-errors 2018-12-05 11:25:45 -07:00
wrappers
ActiveRoomObserver.js
AddThreepid.js
Analytics.js Track UISIs in bulk 2018-06-28 15:07:27 +01:00
Avatar.js
BasePlatform.js
CallHandler.js Appease the linter 2018-07-24 19:14:44 +01:00
CallMediaHandler.js Allow selecting audio output for WebRTC Audio/Video calls 2018-05-26 17:22:23 +01:00
ComposerHistoryManager.js eslint --fix src/ 2018-10-26 22:50:38 -05:00
ContentMessages.js Remove useless comment. 2018-10-03 10:39:09 +01:00
createRoom.js Replace view_set_mxid with require_registration 2018-09-05 18:08:49 +01:00
cryptodevices.js await room.getEncryptionTargetMembers in cryptodevices 2018-08-07 14:48:07 +02:00
DateUtils.js
DecryptionFailureTracker.js Implement aggregation by error type for tracked decryption failures 2018-07-05 13:54:44 +01:00
dispatcher.js
email.js
Entities.js eslint --fix src/ 2018-10-26 22:50:38 -05:00
extend.js
FromWidgetPostMessageApi.js Implement always-on-screen capability for widgets 2018-07-11 18:07:32 +01:00
GroupAddressPicker.js Import react as React in src/GroupAddressPicker.js 2018-07-04 10:57:03 +09:00
groups.js
HtmlUtils.js eslint --fix src/ 2018-10-26 22:50:38 -05:00
ImageUtils.js
index.js
IntegrationManager.js Add callback handler for integration manager close. 2018-03-29 18:32:49 +01:00
Keyboard.js
KeyRequestHandler.js
languageHandler.js Fix some more lint errors 2018-10-11 22:06:01 -05:00
Lifecycle.js Factor out common login code (#2307) 2018-12-05 17:39:38 +01:00
linkify-matrix.js prevent multiple ports (🔢1234:1234) 2018-06-26 23:41:46 +01:00
Login.js Factor out common login code (#2307) 2018-12-05 17:39:38 +01:00
Markdown.js undo removal of stripping <p>s as it breaks HTML /mes 2018-07-18 10:48:54 +01:00
matrix-to.js Appease the linter 2018-12-05 18:14:22 -07:00
MatrixClientPeg.js Handle crypto db version upgrade 2018-11-16 11:31:46 +00:00
Modal.js Remove outdated logging & log on failure 2018-11-21 17:35:28 +00:00
Notifier.js move nag bar clear statement to any desktop notif toggle not just 0->1 2018-07-01 23:48:00 +01:00
ObjectUtils.js
PageTypes.js
PasswordReset.js eslint --fix src/ 2018-10-26 22:50:38 -05:00
PhasedRollOut.js fix lint 2018-10-15 17:01:30 +02:00
phonenumber.js Fix a few no-useless-escape lint errors 2018-10-26 23:00:54 -05:00
PlatformPeg.js
Presence.js eslint --fix src/ 2018-10-26 22:50:38 -05:00
ratelimitedfunc.js
Registration.js Add m.login.terms to the ILAG-compatible flows 2018-11-14 17:59:24 -07:00
Resend.js
RichText.js fix conjugated emoji in slate 2018-07-24 14:35:23 +01:00
Roles.js
RoomInvite.js Rename returned completion states to be something sensible 2018-12-05 11:27:48 -07:00
RoomListSorter.js
RoomNotifs.js
Rooms.js eslint --fix src/ 2018-10-26 22:50:38 -05:00
RtsClient.js
ScalarAuthClient.js eslint --fix src/ 2018-10-26 22:50:38 -05:00
ScalarMessaging.js Revert "Revert "Fix showing peek preview while LL members are loading"" 2018-08-22 16:35:58 +01:00
SdkConfig.js eslint --fix src/ 2018-10-26 22:50:38 -05:00
shouldHideEvent.js Speed up room unread checks by not hitting the SettingsStore so often 2018-12-07 20:15:21 -07:00
Skinner.js
SlashCommands.js Appease the linter 2018-11-29 15:16:45 -07:00
stripped-emoji.json allow autocompleting Emoji by common aliases, e.g 👍 to 👍 2018-07-24 17:06:45 +01:00
TextForEvent.js Fix brace style in TextForEvent.js 2018-10-02 22:12:39 -05:00
Tinter.js Put Tinter loop body in a try/catch 2018-04-11 18:31:54 +01:00
ToWidgetPostMessageApi.js Expose the requestId fully in the toWidget postMessage API 2018-05-12 14:31:58 -06:00
UiEffects.js
Unread.js don't let 3pid invites mark room as unread 2018-02-21 23:51:45 +00:00
UserActivity.js eslint --fix src/ 2018-10-26 22:50:38 -05:00
UserAddress.js
UserSettingsStore.js eslint --fix src/ 2018-10-26 22:50:38 -05:00
VectorConferenceHandler.js Fix lint errors in VectorConferenceHandler.js 2018-10-11 21:54:25 -05:00
Velociraptor.js forward prop updates to children in Velociraptor with React.cloneElement 2018-10-10 16:15:50 +02:00
VelocityBounce.js Fix eslint --fix 2018-10-26 23:04:00 -05:00
WhoIsTyping.js
WidgetMessaging.js Send the widgetId as part of all toWidget requests 2018-05-12 14:32:12 -06:00
WidgetMessagingEndpoint.js Refactor widget postMessage API. 2018-03-28 12:22:06 +01:00