githubbob42 / mingle2github2

0 stars 1 forks source link

Limit number of simultaneously dispatched/queued requests #5894

Open githubbob42 opened 5 years ago

githubbob42 commented 5 years ago

Mingle Card: 5674 Narrative

The current sync dispatches all pages for an sobject simultaneously and defers to default browser behavior for managing concurrent requests.

We also set a default timeout of 2 minutes per request, so if there are enough pages it’s possible for entire batches of queued requests to fail.

Acceptance Criteria

Limit the number of simultaneously dispatched requests so that they stay reasonably within browser limits for concurrent requests. This should allow tablets to more likely sync successfully for large syncs.

Analysis

Instead of dispatching all pages at once, break into about 6 chunks and queue requests in each chunk. Multiple sobjects are still processed simultanously so the best we can do is to break up each sobject into 6 chunks but this change is meant to have the most impact when syncing a particularly large number of records for a single sobject (like ginormous pricebooks) that have hundreds of pages of records.

Related Stories

Tasks

{{ table query: SELECT Number, Name, Owner, 'Task Status' WHERE Type = Task and Story = THIS CARD ORDER BY Status }}

Defects

{{ table query: SELECT Number, Name, Owner, 'Status' WHERE Type = Defect and 'Related Story' = THIS CARD }}

Test Plan

Successfully sync using tomfield@test3.com on iPad (takes about 20min for full sync)

githubbob42 commented 5 years ago

Pull Request #2736