From 30332a21d6f101eb7eae7e4617896b7537f02b0d Mon Sep 17 00:00:00 2001 From: Jason Whitmore Date: Sun, 9 Feb 2025 20:13:02 -0800 Subject: [PATCH] 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. --- .../nearby/presenter/NearbyParentFragmentPresenter.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/presenter/NearbyParentFragmentPresenter.kt b/app/src/main/java/fr/free/nrw/commons/nearby/presenter/NearbyParentFragmentPresenter.kt index ce268f7a3..21892cff1 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/presenter/NearbyParentFragmentPresenter.kt +++ b/app/src/main/java/fr/free/nrw/commons/nearby/presenter/NearbyParentFragmentPresenter.kt @@ -75,8 +75,8 @@ class NearbyParentFragmentPresenter * - **connnectionCount**: number of parallel requests */ private object LoadPlacesAsyncOptions { - const val BATCH_SIZE = 3 - const val CONNECTION_COUNT = 3 + const val BATCH_SIZE = 10 + const val CONNECTION_COUNT = 20 } private var schedulePlacesUpdateJob: Job? = null @@ -91,7 +91,7 @@ class NearbyParentFragmentPresenter private object SchedulePlacesUpdateOptions { var skippedCount = 0 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