Open kirillt opened 1 year ago
It seems that not much of computation is duplicated. Core arklib
(Rust) only computes ResourceId
and a timestamp. Passing timestamp from the core would allow elimination of Files.getLastModifiedTime(path)
expression. This is good for performance, but not critical.
Actually, 2 calls to filesystem is made for each resource. And I've removed indexes caching at Kotlin side. So better to implement this richer structure passing from Rust side.
ResourceIndex
should pass complete resources with their details duringupdate
. Right now, onlyResourceId
s are passed. This causes the library clients to reconstruct details again.See
fun compute
inResource.kt
(https://github.com/ARK-Builders/arklib-android): https://github.com/ARK-Builders/arklib-android/blob/f95ffc3b97c18e00f0cbed40b6b5c854254cab1c/lib/src/main/java/space/taran/arklib/domain/index/Resource.kt#L22