Skip to content

Conversation

larixer
Copy link
Member

@larixer larixer commented Jun 6, 2022

What's the problem this PR addresses?

Speeds up nm linker link step for hardlinks-global mode.

How did you fix it?

Because all the hardlinks pointing to the same file share the same mtime the nm linker now utilizes this fact. It checks whether the file mtime within a small 1 second range which was memorized in the content addressable store and uses it as the fact that the file in the content addressable store was not changed. If the mtime differs the linker will proceed with checking contents checksums as previously.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@larixer larixer marked this pull request as ready for review June 7, 2022 06:23
@larixer
Copy link
Member Author

larixer commented Jun 7, 2022

Merged into #4533 as well,

@larixer larixer closed this Jun 7, 2022
@larixer larixer deleted the larixer/hardlinks-global-perf branch June 7, 2022 14:36
@larixer larixer restored the larixer/hardlinks-global-perf branch June 9, 2022 10:17
@larixer larixer reopened this Jun 9, 2022
@larixer larixer enabled auto-merge (squash) October 18, 2022 19:09
@netlify
Copy link

netlify bot commented Oct 18, 2022

Deploy Preview for leafy-naiad-142cc5 failed.

Name Link
🔨 Latest commit acf15fa
🔍 Latest deploy log https://app.netlify.com/sites/leafy-naiad-142cc5/deploys/634eff012da9870008496b17

@larixer larixer merged commit 77e525a into master Oct 18, 2022
@larixer larixer deleted the larixer/hardlinks-global-perf branch October 18, 2022 19:46
merceyz added a commit that referenced this pull request Nov 3, 2022
* Speedup hardlinks-global link step by 1.5-1.7x

* Adjust mtime comparison to detect immediate file writes

* Adds a test to check store modification in the past

* Adds changelog entry

* chore: update changelog

* chore: remove old changelog entry

Co-authored-by: Maël Nison <[email protected]>
Co-authored-by: merceyz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants