mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2025-05-11 13:15:39 +02:00
perf: Skip re-writing public.xml file after reading
This commit is contained in:
parent
7c9eb849e7
commit
2fa35c73ac
1 changed files with 3 additions and 1 deletions
|
@ -48,7 +48,9 @@ fun resourceLiteral(
|
|||
|
||||
val resourceMappingPatch = resourcePatch {
|
||||
execute {
|
||||
document("res/values/public.xml").use { document ->
|
||||
// Use a stream of the file, since no modifications are done
|
||||
// and using a File parameter causes the file to be re-wrote when closed.
|
||||
document(get("res/values/public.xml").inputStream()).use { document ->
|
||||
val resources = document.documentElement.childNodes
|
||||
val resourcesLength = resources.length
|
||||
resourceMappings = HashMap<String, ResourceElement>(2 * resourcesLength)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue