damontecres / StashAppAndroidTV

Android TV App for Stash
GNU Affero General Public License v3.0
62 stars 5 forks source link

Speed improvements for card view layout & main page load time #289

Closed damontecres closed 1 month ago

damontecres commented 1 month ago

PlayerViews for a card are now inflated on demand. Since this is a somewhat expensive view to create, this speeds up the layout a bit (micro benchmarks show up to 50%, but more like ~20% on average). The trade off is it takes an extra 50-100ms to start a video preview now.

The icon row is switched to a ConstraintLayout with fewer nested views. This saves a small amount of time.

The main page now starts loading data during onCreate instead of onResume which saves a small amount of time (100-300ms maybe) while the page's view is being inflated.