matomo-mobile-2
matomo-mobile-2 copied to clipboard
Preload graph in low resolution under circumstances
If battery state is unplugged and battery level is < 20% we could always only load the low resolution.
If network type is mobile and/or if user is on a slow network we could preload the graph in low resolution and once finished load it in higher res if user is still on this screen.
Comparison overview graph (390x150px): Low res (@1x): 2KB High res iPhone 6 Plus (@3x): 16KB High res Android (up to @4x): 23KB and more depending on the phone and even more on tablets
Evolution graph (390x150px): Low res (@1x): 23KB High res iPhone 6 Plus (@3x): 108KB High res Android (up to @4x): 151KB and more depending on the phone and even more on tablets
When loading the graphs in fullscreen the size can easily go > 300KB
wow that's indeed a huge difference. It will make the graphs load many seconds earlier to users. Good idea.
once finished load it in higher res if user is still on this screen
so much win :+1: