NearbyParentFragmentPresenter.kt: change async and place update parameters

Before this commit, the parameters that configure the async and place update code contributed to
the slow loading of the red and green map markers.

This commit changes the parameters such that the red and green map markers load much faster.

These parameters may need further tuning. This commit's changes are simply an educated
guess at a good parameter set.
This commit is contained in:
Jason Whitmore 2025-02-09 20:13:02 -08:00
parent 950df4e61b
commit 30332a21d6

View file

@ -75,8 +75,8 @@ class NearbyParentFragmentPresenter
* - **connnectionCount**: number of parallel requests * - **connnectionCount**: number of parallel requests
*/ */
private object LoadPlacesAsyncOptions { private object LoadPlacesAsyncOptions {
const val BATCH_SIZE = 3 const val BATCH_SIZE = 10
const val CONNECTION_COUNT = 3 const val CONNECTION_COUNT = 20
} }
private var schedulePlacesUpdateJob: Job? = null private var schedulePlacesUpdateJob: Job? = null
@ -91,7 +91,7 @@ class NearbyParentFragmentPresenter
private object SchedulePlacesUpdateOptions { private object SchedulePlacesUpdateOptions {
var skippedCount = 0 var skippedCount = 0
const val SKIP_LIMIT = 3 const val SKIP_LIMIT = 3
const val SKIP_DELAY_MS = 500L const val SKIP_DELAY_MS = 100L
} }
// used to tell the asynchronous place detail loading job that the places' bookmarked status // used to tell the asynchronous place detail loading job that the places' bookmarked status