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

Parallel cache push strawman #4467

Merged
merged 4 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
Python to 3.6, and it was not until Python 3.7 where `threading` became
default supported. In practice, we expect most real world Python 3.6 deployments
will have `threading` support enabled, so this will not be an issue.
- CacheDir writes no longer happen within the taskmaster critical section,
and therefore can run in parallel with both other CacheDir writes and the
taskmaster DAG walk.

From Mats Wichmann:
- Add support for Python 3.13 (as of alpha 2). So far only affects
Expand Down
2 changes: 2 additions & 0 deletions RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ IMPROVEMENTS
the new scheduler is now used for -j1 builds as well.
NOTE: This should significantly improve SCons performance for larger parallel builds
(Larger -j values)
- CacheDir writes no longer happen within the taskmaster critical section, and therefore
can run in parallel with both other CacheDir writes and the taskmaster DAG walk.


PACKAGING
Expand Down
4 changes: 2 additions & 2 deletions SCons/Taskmaster/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ def execute(self):
SCons.Warnings.warn(SCons.Warnings.CacheCleanupErrorWarning,
"Failed copying all target files from cache, Error while attempting to remove file %s retrieved from cache: %s" % (t.get_internal_path(), e))
self.targets[0].build()
for t in self.targets:
t.push_to_cache()
else:
for t in cached_targets:
t.cached = 1
Expand Down Expand Up @@ -299,8 +301,6 @@ def executed_with_callbacks(self) -> None:
for side_effect in t.side_effects:
side_effect.set_state(NODE_NO_STATE)
t.set_state(NODE_EXECUTED)
if not t.cached:
t.push_to_cache()
t.built()
t.visited()
if (not print_prepare and
Expand Down
Loading