-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[build] libsairedis takes 1.5h to build (used to be 3-4 min in the past) #13775
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
Comments
Could you elaborate on where you're seeing the 1.5-hour build time? The most recent commit in sairedis was built in 25 minutes, which is still high, IMO, but much less than 1.5 hours. |
Could you also check to see if sonic-net/sonic-sairedis#1194 results in any improvement? Note that testing this PR as part of the full sonic build will require some additional changes (specifically, the build profiles will need to be set instead of build targets). |
@saiarcot895 I am not measuring CI build, if I do |
It appears that SWIG 4.0 is resulting in a large time increase to compile the C++ files that it generates, compared to SWIG 3.0 (in Buster). The changes in sonic-net/sonic-sairedis#1194 should cut down the time significantly from 1.5 hours (I'm estimating it should go down to 30 minutes), but it won't be the same as what it was with SWIG 3.0. Edit: Either SWIG 4.0 or gcc is causing the compilation time increase; I'm leaning towards SWIG 4.0, since this scale of time increase doesn't appear to be present in other builds. |
We are seeing an increase in sairedis build time after migrating to 202211 that may be related here as well - our local builds went from ~25 mins to ~50 mins, which appears to be mostly time spent in SWIG. |
Fix sonic-net/sonic-buildimage#13775 -fvar-tracking-assignments Annotate assignments to user variables early in the compilation and attempt to carry the annotations over throughout the compilation all the way to the end, in an attempt to improve debug information while optimizing. By default, this flag is enabled. There is no reason to use this flag for auto-generated code.
Description
Steps to reproduce the issue:
Describe the results you received:
It takes 1.5h to build
Describe the results you expected:
202019/202012 libsairedis can be built in 3-4 minutes.
Output of
show version
:14012cf (master)
Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: