mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-06-12 21:27:38 +02:00
perf: Move variables to local scope
This commit is contained in:
@ -12,12 +12,12 @@ lateinit var resourceMappings: List<ResourceElement>
|
||||
private set
|
||||
|
||||
val resourceMappingPatch = resourcePatch {
|
||||
val threadCount = Runtime.getRuntime().availableProcessors()
|
||||
val threadPoolExecutor = Executors.newFixedThreadPool(threadCount)
|
||||
|
||||
val resourceMappings = Collections.synchronizedList(mutableListOf<ResourceElement>())
|
||||
|
||||
execute {
|
||||
val threadCount = Runtime.getRuntime().availableProcessors()
|
||||
val threadPoolExecutor = Executors.newFixedThreadPool(threadCount)
|
||||
|
||||
// Save the file in memory to concurrently read from it.
|
||||
val resourceXmlFile = get("res/values/public.xml").readBytes()
|
||||
|
||||
|
Reference in New Issue
Block a user