-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
icon name pattern matching optional but default with F=regex_icon
Testing with hyperfine [1], the icon pattern matching with the one default 'SD Card Reader' pattern seems to increase runtime by ~35%. Sounds large but we are talking in < 5 ms region for runs so this is perhaps 2 ms. I think the performance hit is worth it so will make default but feature can be disabled by removing 'regex_icon'. Also useful as a crate to avoid the added regex dependency. Worth point out that even with the feature enabled, if there are no `Icon::Name` in the theme, the performance is not impacted. [1] `hyperfine -N --warmup 3 'cyme --from-json ./tests/data/cyme_libusb_merge_macos_tree.json' '/Users/john/.cargo/target/release/cyme --from-json ./tests/data/cyme_libusb_merge_macos_tree.json'` Summary cyme --from-json ./tests/data/cyme_libusb_merge_macos_tree.json ran 1.35 ± 0.12 times faster than /Users/john/.cargo/target/release/cyme --from-json ./tests/data/cyme_libusb_merge_macos_tree.json
- Loading branch information
Showing
3 changed files
with
48 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters