Closed Bug 1268730 Opened 4 years ago Closed 4 years ago
Consider scheduling core ping uploads less frequently
In implementing bug 1243585, I discovered an issue: Since an IntentService handles one Intent at a time and queues sebsequent Intents, an upload attempt can block the next upload attempt. This is problematic in the case that we don't have a connection - e.g. if we block for 2 minutes on each upload attempt, then each Intent will keep the radio active for two minutes and our users will have a bad day. I worked around this by decreasing the connection timeouts (if we can't connect, we store the pings and can always try again later!), however we can do better with better scheduling. With the core ping, we attempt upload immediately, which is likely to cause a back-up. We could schedule a bit better to ensure this doesn't happen. If the code changes, don't forget to update the comment in PingResultDelegate.
I solved this (before landing) by clearing the Intent queue if we experience connection failures. This has trade-offs – by clearing the queue: + We don't waste resources (e.g. battery) trying to upload when there are likely to be failures - If we would have regained connection, we would have had a successful upload - atm, we only schedule core ping uploads when Firefox is started so it's possible we'd never send these pings (but we would have if we had attempted to upload for longer.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.