perf(dracut-functions): optimize inst_libdir_file()#2353
Open
aafeijoo-suse wants to merge 1 commit into
Open
Conversation
99637e0 to
b13b918
Compare
Let's start analyzing the output of a non-hostonly build, focusing on the
`inst_libdir_file()` calls:
```
$ dracut -f -N --debug testn.img 2>&1 &> testn.txt
$ grep -r -c "(inst_libdir_file): inst_multiple" testn.txt
17
$ grep -r "(inst_libdir_file): inst_multiple" testn.txt | awk -F"inst_multiple " '{ print $2 }' | tr ' ' '\n' | sort | wc -l
295
$ grep -r "(inst_libdir_file): inst_multiple" testn.txt | awk -F"inst_multiple " '{ print $2 }' | tr ' ' '\n' | sort -u | wc -l
201
```
There are 94 files that are attempted to be installed multiple times. After
adding a simple cache:
```
$ grep -r -c "(inst_libdir_file): inst_multiple" testn2.txt
13
$ grep -r "(inst_libdir_file): inst_multiple" testn2.txt | awk -F"inst_multiple " '{ print $2 }' | tr ' ' '\n' | sort | wc -l
201
```
b13b918 to
735d351
Compare
Conan-Kudo
approved these changes
Apr 10, 2026
Member
|
I would prefer to aim for a bigger improvement: Instead of caching on individual file level, I would go one step further for #1419: Add staging functions similar to the inst_* functions. These functions would just collect what should be added. Then call an dracut-intsall equivalent to only write a manifest for 3cpio. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Let's start analyzing the output of a non-hostonly build, focusing on the
inst_libdir_file()calls:There are 94 files that are attempted to be installed multiple times. After adding a simple cache:
Checklist