perf(home): Ask for 6 hours of guide instead of 14 #36
Loading…
Reference in a new issue
No description provided.
Delete branch "perf/home-guide-window"
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?
What was wrong
Home asked for the guide from 2 hours ago to 12 hours ahead. Home opens first, so that window, plus the cache's margins (
EpgCachePolicy.downloadWindow: 2 hours before, 6 hours and the 3-hour TTL after), set what the pool'sguide_window(#35) sends: 4 hours back and 21 ahead. That is 3.02 MB of the full guide's 3.40 MB, so #35 saved little.What changed
HomeViewModel.ktasks for now to 6 hours ahead (HomeViewModel.guideWindow), the same reach as Search, Sports and the player. Home only shows what is on now, UP NEXT, and the channel info panel's next three programmes.HomeGuideWindowTest.ktchecks the entry Home's window creates serves the Guide at every width (2-8 hours), Search, Sports, the player, Favorites and Home itself, at several minutes past the hour and for the cache's 3 hours. The other screens' windows are copied from their view models, so a change there that this no longer covers fails the test.Verified
testDebugUnitTest(620 tests),lintDebugandassembleDebugpass.main) 99.6%.main3.02 MB, this branch 2.31 MB, full guide 3.40 MB.past_hours=2&future_hours=15, and download plus parse took 3.6 s (median of the 22 runs that used the window), against 4.2 s with #35 alone and 4.4 s before it. The channel info panel on CBS 9 Washington showed now and all three UP NEXT rows. After a relaunch, the Guide was served from the saved guide with no download.pool_infotook longer than the app's 3-second limit, so the app treated the pool as a plain panel and downloaded the full guide. That was already the case with #35; the guide was still correct.