summaryrefslogtreecommitdiff
path: root/scripts/construct_context.py
diff options
context:
space:
mode:
author Usta (Tsering) Shrestha <usta@google.com> 2022-11-08 18:31:14 -0500
committer Usta (Tsering) Shrestha <usta@google.com> 2023-02-07 06:23:43 +0000
commitc4c07b12b60929726a626df0caecbcd6a182b4b7 (patch)
treedada4d7cd726a501e4970238f1daaaa87046465d /scripts/construct_context.py
parent1bb18bb2aca0a7a53cb6784e1bf49bea94c936d1 (diff)
reduce forest generation to be incremental
Previously, symlink forest generation involved removing the entire symlink forest and recreating it from scratch. With this change, a) symlinks which need not change are untouched, b) symlinks pointing to the wrong location are fixed, and c) symlinks which should no longer exist are removed. On AOSP on my local machine, this reduces the symlink forest generation step from 2.5s to 1.1s clean, and 0.6s when a single file is added to a source directory. Bug: 257528847 Test: m bp2build, touch `fakefile` under the forest, remove a file from the source tree, rerun m bp2build. Manually verify the new forest does not retain the link to the deleted source file, and that fakefile no longer exists in the forest. Change-Id: I481371ae487e9419af6a3a4370c552578b07d650
Diffstat (limited to 'scripts/construct_context.py')
0 files changed, 0 insertions, 0 deletions