rules_foreign_cc icon indicating copy to clipboard operation
rules_foreign_cc copied to clipboard

Recursive symlink_contents_to_dir is slow

Open johnjwang opened this issue 4 years ago • 3 comments

In a similar vein to #804, even on Linux the recursive symlink_contents_to_dir process can be extremely slow. I'm not sure why it's necessary to recursively symlink dependencies rather than just the top-level dir.

When I compile a program that has a boost dependency using rules_boost, it spends nearly 9 minutes on this line in build_script.sh:

symlink_contents_to_dir $EXT_BUILD_ROOT/external/boost $EXT_BUILD_DEPS/include

Because rules_boost adds its root dir to the include path, it's not only symlinking headers but also every source/doc file. But why are we doing this instead of symlinking the top-level dependency directory? (i.e. what #805 proposes but on all platforms)

johnjwang avatar Nov 18 '21 02:11 johnjwang

Despite its name is actually copies some files (as some path replacement has to happen on some files). However it should, as you say, only symlink at the top most directory that doesn't include any of the file types that need to be copied.

jsharpe avatar Nov 18 '21 23:11 jsharpe

This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_foreign_cc!

github-actions[bot] avatar May 18 '22 22:05 github-actions[bot]

This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_foreign_cc!

github-actions[bot] avatar Nov 25 '22 22:11 github-actions[bot]