mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
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:
parent
950df4e61b
commit
30332a21d6
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue