cded632fd2
## Issue Part of `5834 Performance investigation` In a homepage with 120 tiles, the lists get rendered 3 times during initial update. The sub-components are updating recursively (will investigate), so instead of 120 DateTime renders, we have 1000+ renders. The resolved DateTime string for `timeAgo` rarely changes, and even if the string was "a few seconds ago", there's no real need to constantly update it. ## Change Require a minimum 1-minute delta when deciding whether the component should update. Clients can change this value as needed. ## Test - [x] Verified `shouldComponentUpdate` doesn't end up taking more time than not having it (it's in micro-second range, compared to the millisecond render). - [x] Profiler showed no significant improvement for low number of DateTime components, but for the 120 DateTime case, almost 1/4 of a second is saved. |
||
---|---|---|
.. | ||
component | ||
constants | ||
effects | ||
modal | ||
page | ||
redux | ||
scss | ||
util | ||
analytics.js | ||
app.js | ||
comments.js | ||
i18n.js | ||
index.jsx | ||
logWarningConsoleMessage.js | ||
native.js | ||
reducers.js | ||
rewards.js | ||
store.js |