Files
SpotiFLAC-Mobile/lib/utils
zarzet 1b0e3803f8 perf(library): build the quality label patterns once
buildLibraryAudioQualityLabel, the grid label and the badge highlight
constructed their RegExp objects on every call. The patterns are now
top-level finals with the same sources and flags.

The Dart VM already caches compiled patterns by source, so this only
saves the per-call cache lookup: on this Mac (AOT, best of six
interleaved runs) a 20,000-row label pass went from 24.9 to 23.6 ms in
bit-depth-only mode and from 25.3 to 23.9 ms in bit-depth mode. A
comparison of the old and new policy over 435,516 inputs (modes, stored
qualities, formats, paths, bitrates, bit depths, sample rates) found no
differing label.
2026-10-31 00:56:58 +07:00
..