-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use regex-lite instead of Regex #168
Conversation
Those lints are either new or have been failing since before this PR. It is not in the scope of this PR to fix them. |
Thank you very much for spotting this and looking for an alternative to the regex crate! The reduction in build time is even more impressive on my Windows machine in a sequential build:
Yes, these lints look like they bubbled up with the latest Clippy. I tried to fix them here in the first place while missing out the MSRV conflict from regex-lite. Created #172 to clean this up. We are currently using Rust 1.59 as MSRV as this is the version shipped with the latest long-term support release (LTS) Kirkstone of Yocto for building Linux distributions. But the next LTS version is about to be released in April and we can increase our MSRV then. Let me sleep over the how and when and I will go forward with integrating your PR soon. |
Okie dokie |
IIUC, it seems that the next Yocto LTS release (Scarthgap, due this month indeed) will ship Rust 1.75.0, which means we can also update nix (See #176). |
Superseded by #201! Thank you for your perseverance with this topic @RossSmyth! |
Switches to using regex-lite rather than Regex. This improve comile time significantly as Regex is pretty chonky, and the regex is not used in a performance critical (imo) area.
My computer is a Windows 10 laptop with an i7-12800H. With rustc 1.77.0, compiling the tests & the rlib.
Release Builds
Regex
Regex-Lite
Debug Builds
Regex
Regex-Lite
So it is much more important in release builds. But there are modest improvements in debug builds too. But I've worked hard to bring compilation times down in my app, and compiling Regex for this crate is currently the longest single crate in terms of wall-time.