add more optimalization

This commit is contained in:
PoliEcho 2026-01-28 22:05:30 +01:00
parent d1314a1b32
commit 4263a7eff0
2 changed files with 5 additions and 4 deletions

View File

@ -4,10 +4,10 @@
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2026-01-28T17:49:25.357991153Z">
<DropdownSelection timestamp="2026-01-28T21:00:38.307279245Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="LocalEmulator" identifier="path=/home/lukas/.config/.android/avd/Medium_Phone_OSS.avd" />
<DeviceId pluginId="PhysicalDevice" identifier="serial=BS98317AA1341400032" />
</handle>
</Target>
</DropdownSelection>

View File

@ -56,8 +56,9 @@ import android.os.StrictMode
// Thread pool for tile downloading to prevent blocking UI thread
private val tileDownloadExecutor = Executors.newFixedThreadPool(4)
private val tileDownloadExecutor = Executors.newFixedThreadPool(
(Runtime.getRuntime().availableProcessors() - 3).coerceAtLeast(1)
)
// MapState configuration for OpenStreetMap
// Max zoom level is 18, tile size is 256x256
// At zoom level 18, there are 2^18 = 262144 tiles in each dimension