2575 improve navigation load time
Related: buyer-experience#2575 (closed)
See notes in issue for initial troubleshooting steps and initial data values of navigation render speed.
What's changing in this MR?
Previously, we were passing down the value of the 6sense API call down two levels of components. This was taking some time and causing multiple navigation
component updates. This MR removes the downward flow of data and directly calls the localStorage audience value from the component(s) that have personalized content: navigation-dropdown
and navigation-mobile-menu
.
This has eliminated one updated()
hook and sped up render speeds.
Example data of average navigation rendering speeds:
Original |
New Updates |
---|---|
Mounted at 8.83ms
|
Mounted at 11.16ms
|
Updated at 43.92ms
|
Updated at 35.26ms
|
Updated again at 249.15ms
|
N/A |
About 250ms for our nav in prod to finish loading. This MR has everything done at ~35ms!
Edited by Megan Filo