Ticket #5350 (closed enhancement: fixed)
[with patch, positive review] sage-clone should use hard links for the build directory
| Reported by: | burcin | Owned by: | burcin |
|---|---|---|---|
| Priority: | major | Milestone: | sage-4.1 |
| Component: | misc | Keywords: | |
| Cc: | cwitty, robertwb, ralf@… | Author(s): | Burcin Erocal |
| Report Upstream: | Reviewer(s): | Robert Miller | |
| Merged in: | sage-4.1.alpha3 | Work issues: |
Description
We copy the build directory when we're cloning the tree. This wastes disk space, and makes switching between branches slow, since new files need to be loaded from disk while the previous ones might already be in the cache.
Attached patch to the scripts repository changes the sage-clone script to hard link the build directory. On my laptop this saves >450 MB per clone.
burcin@karr ~/sage/sage-3.3/devel $ du -sh sage-* 593M sage-hl 125M sage-hl1 557M sage-main
Also the time to clone on my laptop goes from:
real 0m14.709s user 0m4.640s sys 0m1.924s
to
real 0m6.100s user 0m4.712s sys 0m0.928s
about 2.8 seconds of which is spent in the sage -b step.
Unfortunately, hard linking the .c, .cpp, and .h files doesn't work. This might be a problem with how cython handles its output when the output file is already present. This would save another ~100MB if it works.

