-
Notifications
You must be signed in to change notification settings - Fork 11
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
Improve performance of interference-bump #96
Conversation
A major improvement 🚀 |
CI is failing because of |
The logs state that prettier isn't happy 🤓 |
Prettier is not happy because it doesn't have files to process? $ prettier . && shellcheck *
[error] No supported files were found in the directory: ".".
$ if prettier . ; then echo true ; else echo false ; fi
[error] No supported files were found in the directory: ".".
false
$ if shellcheck * ; then echo true ; else echo false ; fi
true |
I think you might be missing the shell plugin, iirc Arch had several packages for this purpose. https://www.npmjs.com/package/prettier-plugin-sh https://github.com/chaotic-aur/toolbox/blob/main/package.json#L5 For reference see the #lint section of the toolboxes' README 😁 |
Still can't find what's wrong. $ yarn run lint
yarn run v1.22.19
$ prettier --check . && shellcheck src/*.sh src/lib/*.sh guest/bin/* slurm-jobs/*/*.sh
Checking formatting...
All matched files use Prettier code style!
Done in 3.28s. |
I will be taking a look as soon as possible. |
Got it... |
This doesn't work with split packages. Did the original? |
Afaik it did not, and pkgbase also did not 👀 |
Will think about how/if-possible to add it. Would be easier if some way to track them. |
More verbose, but 21-25x speed-up.
Test scripts: bump_old.sh, bump_new.sh
Performance note: Original function was O(n^2) because it has nested n-loops. Revised function is O(n log n) because of use of
sort
. If not for sort, it would be O(n) because the outer loops are over small lists, O(1). Expected performance should be close to O(n) because package lists should be already sorted. It looks more inefficient because of repeated O(1) and O(n) blocks. But they combine to O(n).Behavior change. Instead of printing entire PKGREL_BUMPS file, prints only bumped packages that haven't been rebuilt yet (without version info) because they are probably broken. Current output: