-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
<1s(?) build time #1602
base: master
Are you sure you want to change the base?
<1s(?) build time #1602
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing to opendbc! In order for us to review your PR as quickly as possible, check the following:
- Convert your PR to a draft unless it's ready to review
- Read the contributing docs
- Before marking as "ready for review", ensure:
- the goal is clearly stated in the description
- all the tests are passing
- include a route or your device' dongle ID if relevant
RE2 val_regexp(R"(VAL_ (\w+) (\w+) (.*))"); | ||
RE2 val_split_regexp(R"((([0-9]) \"(.+?)\"))"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notes:
- no tests match
\s*[-+]?
so this was removed - RE2 doesn't support a variable number of matching groups (the reason for the small refactor here and below)
This does improve the speed, but doesn't quite get to <1s. Ran a bunch of times on my machine, and it's consistently ~2.2s:
Aside from that, this approach adds both a fairly large dependency and goes from 1 -> 2 cases.
I'm not sold that we can't do this with minimal to no tradeoffs (such as having to check in a precompiled header when the regex changes). |
† Note: 0.9(5)s means 0.9s ± 0.05s which means between 0.85 and 0.95 seconds. 0.95(1) means between 0.949...0.951 |
Update @adeebshihadeh :
|
Co-authored-by: William Deegan <[email protected]>
Yo @adeebshihadeh can you run this again and let me know how fast it is on your machine? I trimmed an additional 25% off the runtime with a SConstruct optimization (that might be worth implementing in other repos you guys maintain) |
Co-authored-by: William Deegan <[email protected]>
FAST=1
)This should resolve issues #1180 and #1528 by reporting <1s build time when running
Results:
Thanks to: