-
Notifications
You must be signed in to change notification settings - Fork 205
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
Builder: file dump order does not match prefetch list #1488
Comments
hangvane
added a commit
to hangvane/image-service
that referenced
this issue
Nov 22, 2023
1. The dump order for prefetch files does not match the order specified in prefetch list, so let's fix it. 2. The construction of `Prefetch` is slow due to inefficient matching of prefetch patterns, By adopting a more efficient data structure, this process has been accelerated. 3. Unit tests for prefetch are added. Signed-off-by: Wenhao Ren <[email protected]>
hangvane
added a commit
to hangvane/image-service
that referenced
this issue
Nov 22, 2023
1. The dump order for prefetch files does not match the order specified in prefetch list, so let's fix it. 2. The construction of `Prefetch` is slow due to inefficient matching of prefetch patterns, By adopting a more efficient data structure, this process has been accelerated. 3. Unit tests for prefetch are added. Signed-off-by: Wenhao Ren <[email protected]>
6 tasks
jiangliu
pushed a commit
that referenced
this issue
Nov 27, 2023
1. The dump order for prefetch files does not match the order specified in prefetch list, so let's fix it. 2. The construction of `Prefetch` is slow due to inefficient matching of prefetch patterns, By adopting a more efficient data structure, this process has been accelerated. 3. Unit tests for prefetch are added. Signed-off-by: Wenhao Ren <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Additional Information
The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all.
The order of files/paths in the provided prefetch list is not used to guide the file dump order currently, since the dump order is built by iterating
Tree
and check ifnode
is in the prefetch list;nydus/builder/src/core/bootstrap.rs
Lines 160 to 167 in 767adcf
Besides, the tree is iterated at least two times. For the first time is to build
prefetch.files
:nydus/builder/src/core/bootstrap.rs
Line 175 in 767adcf
For the second time is to classify the nodes in tree into prefetch and non-prefetch, with the need of
prefetch.files
to be BTreeMap for supporting random searching:nydus/builder/src/core/layout.rs
Lines 32 to 39 in 767adcf
Seems it's better to iterate tree only once to build the prefetch
Vec<Node>
and non-prefetchVec<Node>
inbuild_rafs()
, and then sort the prefetchVec<Node>
by the order of the provided prefetch list.The text was updated successfully, but these errors were encountered: