Status Update
Comments
ns...@google.com <ns...@google.com>
qi...@xiaomi.com <qi...@xiaomi.com> #2
Triage notes: Assigning for a response.
al...@google.com <al...@google.com> #3
When updating the providers, startProvider()
is comparing the new scope produces with the previous scope produced, instead of the current parent scope, to determine if the content of the provider needs to change, ignoring if the parent changed. That has the effect of, if a provider provides a value that is identical to the parent value, the composer thinks that none of the the static composition locals changed and it doesn't need to force updates of the content of the provider.
The temporary work-around for this is to use a compositionLocalOf
instead. Using compositionLocalOf
is recommended for composition locals that can change and static should are not recommended for values that can change.
However, in the above example, LocalOtherValue
only changes once so using a staticCompositionLocal
is recommended as it avoids the overhead for tracking reads of a value that rarely changes, making this work-around temporary for LocalOtherValue
or similar locals.
qi...@xiaomi.com <qi...@xiaomi.com> #5
This issue also affects Material theming changes because they use staticCompositionLocalOf
under the hood. And those cannot be changed by a work-around.
Description
When searching for files in a zip (in ForEachFileInZip), we can add more stringent prefix and suffix restrictions to reduce unnecessary FindEntry calls in Next, which occur within ForEachFileInZip.
We tested five apps and found that after optimization, the time consumption of DiscoverLayers decreased from 13.83ms to 6.07ms, a reduction of 56.11%.