-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Description
Currently with SAM, you are able to specify a cache, which is nice. But sometimes, using that cache is actually slower than just running a regular sam build. SAM copies all the files from the cache, and then writes them in the build directory. This is a lot of I/O operations, and can take forever on old and newer computers, especially if your project runs in node.
Proposal
Instead of copying all the files directly, how about you create a symbolic or hard link to each files. This way, there will be less overhead when performing builds, no need to copy the entire file, just create a reference to the associated file.
Maybe this isn't the default way of doing it, but provide an option to do so. Maybe a parameter you can pass into the --cached parameter?
Things to consider:
- Speed up builds significantly
- Saves disk space
Additional Details
This might introduce issues where, a user decides to manually edit a hard link, and that will effect the original cache. But I think this feature would be a great optional use.