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

Support for linking object files into object cache rather than copying them #1

Open
lewissbaker opened this issue Jan 18, 2015 · 0 comments

Comments

@lewissbaker
Copy link
Owner

When using the object-file cache we could use file-system linking to avoid copying unnecessarily, either when adding files to the cache or retrieving files from the cache. This can help to reduce build times and also reduce disk space usage.

Where hard-linking is supported and the cache directory is on the same volume as the built object-file we could hard-link the cached file to the same file as the built object-file. This would eliminate a copy operation when inserting objects into the cache and when the built object-file is removed the cache copy would still remain available.

Where symbolic-linking is supported and we want to use an object file from the cache, we could create a symbolic link to the object file in the cache directory rather than copying the file from the cache directory into its final destination.

Both of these linking approaches would come with the caveat that the build should not modify the object files after they have been built. We could possibly enforce this if linking was enabled by setting the file permissions to read-only.

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

No branches or pull requests

1 participant