[performance] Performance EPIC #16616
flexsurfer
started this conversation in
General
Replies: 1 comment
-
Moving to discussion, and we can add each item when ready to be worked on |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://discuss.status.im/t/the-story-about-100ms/1630
General:
Sign in:
Chat:
* [ ] Remove all subscriptions from list items [perfromance][chat] Remove all subscriptions from list items #10380Contacts:
Part 2 (26/04/21)
So far we've implemented lots of improvements but why UI sometimes still slow and clunky?
First, lets separate UI slowness (unresponsiveness) and loading (UI is responsive)
For loading, we know the next issues
UI slowness (unresponsiveness)
99% of time its js thread, here we have two major parts, 1 - re-frame event handlers , 2 - reagent/react , they go one after another, and we have T = Th + Tr , in ideal T should be less than 100ms
for Th most critical parts are signals, new messages, chats, mailserver filters etc, some of them might take even seconds.
for Tr most critical, screen creation and screen forceUpdates especially with flatlist, some of them might take even seconds
so in worst cases, it can be a signal which takes a few seconds and then screen update with flatlist which might take seconds as well, in that case, any buttons will be unresponsive, js task for button event handler can't be run because js thread is busy
known issues
most critical one, after sign in with lots of chats there is a tabs screen with loading indicator, but UI is unresponsive for a few seconds (not possible to navigate between tabs), here we have both Th and Tr, in Th we have lots of event handlers with app data initialization and for Tr we have flatlist with chats
opening chat, and messages scrolling, same here , Th for handle more message from status-go and Tr for flatlist creation/update
sometimes any part of UI can be slow because there is a signal from status go, and handlers use js thread for a long time, for example signal from mailserver is heavy
So there are two most critical directions
1) Flatlist
The most critical part is item renderer or item layout, it should be just flat and simple without any logic or complex layout, in our case for both chat and message items item is very complex
2) re-frame handlers
The most critical part is signals from status-go , app initialization and loading more messages in chat
We need to
we already moved a lot to status-go its not a simple task, currently, we're moving mailservers , it should improve a lot
Beta Was this translation helpful? Give feedback.
All reactions