Commit Graph

14 Commits (8dbe87f09b55d69ddf5bf1b50bd1ef5ff39ea57d)

Author SHA1 Message Date
Travis Ralston ebdba32393
Add a comment about the SettingsStore being slow 2018-12-08 12:06:37 -07:00
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
Michael Telatynski bd4b40309d
fix based on PR review
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-02-28 00:49:14 +00:00
Michael Telatynski 773fef7f1d
fix shouldHideEvent saying an event is a leave/join when a profile change
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-02-22 16:14:56 +00:00
Travis Ralston 63bebe9dfd Split out avatar and display name hiding
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-13 12:58:10 -07:00
Travis Ralston ae10a11ac4 Convert synced settings to granular settings
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-29 01:43:52 -06:00
Michael Telatynski 5450d6b9ca
remove redundant check and add comment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-08-10 15:22:53 +01:00
Michael Telatynski 625ca96d86
add comment about why state key must be not undefined
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-08-10 14:01:24 +01:00
Michael Telatynski a6064c53d3
export shouldHideEvent fn named
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-08-10 14:00:26 +01:00
Michael Telatynski 1603360c13
s/Membership/Member/
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-08-10 13:58:19 +01:00
Michael Telatynski ffdffb643d
allow hiding of avatar/display name changes 2017-08-04 17:22:01 +01:00
Michael Telatynski 3b8c408482
update comment to make explain behaviour better 2017-07-26 13:37:33 +01:00
Michael Telatynski 762e6780d7
fix this hiding unbans as found by Luke's review 2017-07-26 11:51:41 +01:00
Michael Telatynski 8167c004a8
re-add core logic
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-21 19:38:01 +01:00