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

On disk cache serialization #6094

Merged

Conversation

rokonec
Copy link
Contributor

@rokonec rokonec commented Jan 27, 2021

Context

BinaryFormater serialization of on-disk RAR cache is slow and unsecure.
Related issue: #6057

Changes Made

Serialization changed to use custom binary format by using existing ITranslatable

Testing

Unit testing
Manual testing

  • Roslyn repo rebuild + incremental build

Notes

@Forgind
Copy link
Member

Forgind commented Jan 28, 2021

Looks roughly good to me, and as I said over Teams—don't worry about the mono failures.

@Forgind Forgind mentioned this pull request Feb 2, 2021
@rokonec rokonec self-assigned this Feb 2, 2021
@rokonec rokonec marked this pull request as ready for review February 2, 2021 22:47
@rokonec rokonec requested a review from Forgind February 2, 2021 22:48
Copy link
Member

@Forgind Forgind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a couple questions and some nits.

src/Build.UnitTests/BackEnd/BinaryTranslator_Tests.cs Outdated Show resolved Hide resolved
src/Build.UnitTests/BackEnd/BinaryTranslator_Tests.cs Outdated Show resolved Hide resolved
src/Shared/TranslatorHelpers.cs Outdated Show resolved Hide resolved
src/Tasks/SystemState.cs Outdated Show resolved Hide resolved
src/Tasks/SystemState.cs Outdated Show resolved Hide resolved
src/Tasks/SystemState.cs Outdated Show resolved Hide resolved
src/Tasks/SystemState.cs Outdated Show resolved Hide resolved
src/Tasks/TaskTranslatorHelpers.cs Show resolved Hide resolved
@cdmihai
Copy link
Contributor

cdmihai commented Feb 4, 2021

Very curious to see what the time differences are between this and master. Please post numbers once you have them :)

@cdmihai

This comment has been minimized.

Copy link
Contributor

@cdmihai cdmihai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General approach looks good. Curios to see perf data comparisons.

@Forgind Forgind added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Feb 6, 2021
@rokonec
Copy link
Contributor Author

rokonec commented Feb 8, 2021

@cdmihai

General approach looks good. Curios to see perf data comparisons.

Perf data:

  • On rotational DISK incremental build of Roslyn is about 8% shorter at RAR wall clock time.
  • On SSD incremental build of OrchardCore is about 2% shorter at RAR wall clock time.
  • RAR cache on-disk size is about 5x smaller (20% of original size).
  • Memory allocated by RAR in incremental Roslyn build is about 15% smaller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants