Open biodranik opened 11 months ago
Criteria
@oleg-pah always showing that message for any SD-card, without considering how slow is it, may be overkill. 80-90% of Android users will see the dialog then.
@biodranik Is the 80-90% statistic about using SD cards or about using SD cards for Organic Maps? The requirement is about determining if Organic Maps is using an SD card. Of course the ideal solution would be even more narrow, in addition to those, determine if the SD card is actually slow. But there are potentially challenges with that across different hardware, and measuring speed is notoriously unreliable.
We need to approach this issue in the right way and show dialog only when it is really necessary. Otherwise, it will be an unnecessary noise that distracts users.
for android: the message should be displayed when the user starts the downloading of map. maybe in 'DownloadResourcesLegacyActivity -> prepareFilesDownload()' method and also and also when user clicks download in MwmActivity ?
for android: the message should be displayed when the user starts the downloading of map. maybe in 'DownloadResourcesLegacyActivity -> prepareFilesDownload()' method and also and also when user clicks download in MwmActivity ?
@arjundevasi this is a great point, will update.
@biodranik Is the 80-90% statistic about using SD cards or about using SD cards for Organic Maps? The requirement is about determining if Organic Maps is using an SD card. Of course the ideal solution would be even more narrow, in addition to those, determine if the SD card is actually slow. But there are potentially challenges with that across different hardware, and measuring speed is notoriously unreliable.
Would it make sense to check how long a common task takes (like displaying / loading a portion of the map, rather than trying to check SD card speed by itself), and to only show the dialog when that time is above a specific threshold? This way, it would only show if the app actually behaves noticeably slowly, and we would not have to check if the card itself is slow. This approach should also work across all hardware.
That is the idea. Now we need to find a way to detect that the app works slowly. But the suggestion should be valid: if the internal memory is also slow for any reason, then moving maps won't improve the situation.
one way to find is to manually find "read/write" speed. we can create a new file and then "read/write" that file to calculate time taken .
Having thought about this issue, I think the main idea here (showing a dialog to inform users) is the wrong one. Reasons:
There is probably never a good time to show that dialog, as it is un-prompted. The obvious option would be to show it after detecting slowness, which makes for a terrible user experience - I am happy that the app has finally loaded, and now I have to dismiss a dialog
Even if we can figure out when to show the dialog, it is probably still irritating because OrganicMaps is likely the only app (or one of the only apps) on a user’s phone that does that. So it might seem as though all other apps can somehow work with the supposedly slow SD card, but OrganicMaps wants a new one.
If we fail to detect slowness correctly (which is likely, as speed depends on a lot of factors), the dialog would either be inappropriately shown, or it may not be shown even if it would be appropriate
I would suggest the following instead:
We put a menu called something like "performance optimization tips" into settings, which then shows a bunch of options (for example: new SD card, download fewer regions, close other apps to free RAM, or anything else we know of that could improve performance). This way, these hints are always accessible, and we have the option to add more later
When the user updates to the version with this in it, show a red dot, or similar, on the menu button (once), so the user knows that performance options exist - if they really need these options, they can try them right then, so even if there is some slowness we do not detect properly, the user will still see the hints. Even if their own install performs fine, maybe this enables them to help a friend running an older version. This will never block them from doing anything urgent, because clicking on the menu with the red dot is completely voluntary.
Doing it this way would solve two of the three issues mentioned with the dialog, and it would put far less pressure on the accuracy of performance measurement. That being said, having a system to measure app / storage performance would still be good, if only so contributors can check if their changes improve or worsen performance. I don't know if this exists already.
A performance settings can be a good idea, maybe we can have a separate issue for that.
Unnecessary messages definitely don't provide a good experience. Context-appropriate messages are typically quite useful. If a person is doing something that can cause slowness (for example downloading maps to a slow SD card), it's better to let them know early and avoid this problem, rather than experience slowness and then try to resolve it.
More context: we are not interested in write speed (it can be slow, but users are mostly ok with longer downloads, and in many cases, the card write speed will be faster than the user's internet download speed). We are interested in read speed. OM is fast on faster memory storage. But it is slow on some slow SD cards. We don't even know the uninstall rate caused by this.
Some more details:
On first startup, if SD card storage has more space, do a speed test of data read to determine if it's fast enough. If it is, use SD card for storage, if not, select internal storage.
Do you propose to postpone the first application startup/initialization in favor of testing the speed of the SD card? The slower startup will worsen the first user impression.
The test shouldn't take more that 1-2 seconds. If a quick and effective test can't be developed, then instead have the download select internal memory by default, while the test of the card happens. If then the test finds the card is fast enough, the map can be moved from internal memory to SD card.
No delays on the startup, please. It is one of the most important metrics for good products: https://developer.android.com/topic/performance/vitals/launch-time
As mentioned in last post, there is a way to do a speed test and add zero time to startup.
Would be helpful to know the current first start time.
This issue is not as important to slow down the startup for everyone even for a half a second. Every app and website fights for the fastest startup to attract users.
The only acceptable approach is to do it in parallel, without slowing down the app startup.
We see complaints from many reviews that OM is "slow" on Android devices with SD cards. Unfortunately, storing maps on SD is almost always slower than storing maps in the internal device memory. Not only SD cards may be slow themselves, but also recent Android 11 and above changes have significantly slowed down reading SD card contents.
The idea is to detect when users are using an SD card (or even better - a slower SD card), and show an appropriate warning message at the right time (not an annoying one), something like this:
You are storing maps on an SD card. If Organic Maps works slower than you expect, try to store maps in the internal memory, or try to use a newer/faster SD card.
CC @oleg-pah