Skip to content
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: delay free data structure to reduce image build time #1298

Merged
merged 1 commit into from
May 25, 2023

Conversation

jiangliu
Copy link
Collaborator

@jiangliu jiangliu commented May 23, 2023

According to perf flame graph, it takes a long time to free objects used by image builder. In most common cases, the builder will only run once and exit, so it's unnecessary to free those used objects.

Types of changes

What types of changes does your PullRequest introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

According to perf flame graph, it takes a long time to free objects
used by image builder. In most common cases, the builder will only
run once and exit, so it's unnecessary to free those used objects.

Signed-off-by: Jiang Liu <[email protected]>
@jiangliu jiangliu requested a review from a team as a code owner May 23, 2023 03:04
@jiangliu jiangliu requested review from bergwolf, liubin and hsiangkao and removed request for a team May 23, 2023 03:04
@anolis-bot
Copy link
Collaborator

@jiangliu , a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/74684

@codecov
Copy link

codecov bot commented May 23, 2023

Codecov Report

Merging #1298 (c8d460a) into master (809f8d9) will increase coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1298   +/-   ##
=======================================
  Coverage   46.03%   46.03%           
=======================================
  Files         124      124           
  Lines       36934    36953   +19     
  Branches    36934    36953   +19     
=======================================
+ Hits        17004    17013    +9     
- Misses      19041    19052   +11     
+ Partials      889      888    -1     
Impacted Files Coverage Δ
rafs/src/builder/core/tree.rs 72.41% <0.00%> (-0.42%) ⬇️
rafs/src/builder/directory.rs 0.00% <0.00%> (ø)
rafs/src/builder/stargz.rs 0.00% <0.00%> (ø)
src/bin/nydus-image/main.rs 40.80% <0.00%> (-0.12%) ⬇️
rafs/src/builder/tarball.rs 63.06% <100.00%> (+0.16%) ⬆️
utils/src/lib.rs 84.33% <100.00%> (+1.44%) ⬆️

... and 2 files with indirect coverage changes

@anolis-bot
Copy link
Collaborator

@jiangliu , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@jiangliu jiangliu merged commit 43e6518 into dragonflyoss:master May 25, 2023
@anolis-bot
Copy link
Collaborator

@adamqqqplay , the title has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/75278

@anolis-bot
Copy link
Collaborator

@adamqqqplay , The CI test is completed, please check result:

Test CaseTest Result
nydus_ci❌ FAIL

Sorry, your test job failed. Please get the details in the link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants