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