Opening a list redraws the whole feed list and makes a date formatter for every row #490
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A CPU profile of the page opening four lists twice (All Subscriptions, a Signal, two podcasts), on production's data at an iPhone 13's size with the CPU slowed 4x, had two costs that do nothing for the list:
selectFeedcalledrenderFeeds(), rebuilding every row of the feed list, folders and art included, only to move the highlight: about 300 ms of the run.dateOfcalledtoLocaleDateStringwith options, which makes a newIntl.DateTimeFormaton every call, once a row: about 155 ms.Out of 2.3-2.5 s of CPU time in the run. In production
list_shownis 145 ms at the median and 780 ms at p95, with the slowest (1.1-2.9 s on the phone) spending 4-45 ms in ipx; the rest is the network and the phone drawing. Found by a speed check.Fixed in
f633f3d, deployed in ipx-web: selecting a feed moves.selandaria-current(markSelected) instead of rebuilding the feed list, and dateOf uses one shared Intl.DateTimeFormat. The same profile run: CPU time 2.3-2.5 s down to 1.25-1.65 s; dateOf 157 ms to 12 ms; renderFeeds ~310 ms to 70-130 ms (what is left is the first draw and live updates). Browser suite: 127 passed.