You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dismissModal helper calls originalDismissModalWithReport, which in turn calls getStateFromPath.
On a regular HT account, single call to getStateFromPath takes about 20ms to complete on the web and about 40ms to complete on iOS.
The getStateFromPath internally calls original getStateFromPath implementation from React Navigation, which is quite complex. It may lead to extensive computation resulting in low performance.
The Navigation.dimissModal is called many time across the codebase (75 usages in 52 files).
The implementation of this proposal would aim to improve dimissModal performance (also targeting additional improvements like reduction of unnecessary re-renders).
Potential gains (defining an upper-bound)
In order to prove it is indeed responsible for low-quality performance during transition, dimissModal was replaced with regular call to navigate method and unnecessary updateSearchValue call was removed entirely:
Keep in mind, this change is not a ready solution (it changes how navigation works) and is here to define how much we could gain after implementing actual solution.
Problem
Transition between
Searchpanel and aReportscreen is not smooth. After user selects a report, it causes:open-report-from-finder.with-timing.baseline.ios.mov
open-report-from-finder.baseline.web.mov
We would like to have app as responsive to user input as possible, while currently it creates a noticeable delay or jittering.
Testing setup:
Reproduction steps:
Searchpanel (akaChatFinder)Solution
Initial investigations show that the potential villain is a piece of
selectReportcallback inChatFinderPagecomponent:The
dismissModalhelper callsoriginalDismissModalWithReport, which in turn callsgetStateFromPath.On a regular HT account, single call to
getStateFromPathtakes about 20ms to complete on the web and about 40ms to complete on iOS.The
getStateFromPathinternally calls original getStateFromPath implementation from React Navigation, which is quite complex. It may lead to extensive computation resulting in low performance.The
Navigation.dimissModalis called many time across the codebase (75 usages in 52 files).The implementation of this proposal would aim to improve
dimissModalperformance (also targeting additional improvements like reduction of unnecessary re-renders).Potential gains (defining an upper-bound)
In order to prove it is indeed responsible for low-quality performance during transition,
dimissModalwas replaced with regular call tonavigatemethod and unnecessaryupdateSearchValuecall was removed entirely:Keep in mind, this change is not a ready solution (it changes how navigation works) and is here to define how much we could gain after implementing actual solution.
The results of proposed change are as follows:
open-report-from-finder.with-timing.upperbound.ios.mov
open-report-from-finder.upperbound.web.mov
Profiling web application shows promising results:
PR with changes: #47726
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @anmurali