Commits on Source (26)
-
Daniel Silverstone authored
We were indiscriminately retrieving the node's provenance data in the `node_get()` function which was accounting for approximately a third of the total runtime of `node_get()` which dominates pre-scheduler time in `bst build`. This change ameliorates that situation by only retrieving the provenance data when it's actually needed. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
We know that nodes are typically one of: str, list, dict, bool, tuple, NoneType or our ChainMap Of these, dict and ChainMap are Mapping, only list is list and the rest are returned unchanged. We can reduce/defer our use of isinstance here, dramatically, improving performance. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
A non-trivial proportion of time pre-scheduler in `bst build` is spent copying (or chain-copying) nodes. Approximately a quarter of the time spent in that effort is in `isinstance()`. This removes that CPU load. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
By re-using the isinstance replacements from earlier commits and using a tuple of the string constants for checking for composition markers, we reduce the cost of node_final_assertions by two thirds in basic testing. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Daniel Silverstone authored
While get_strict() doesn't look expensive per-se, it is called so many times that it is valuable to cache the result once computed. Since I don't think it can change once it is computable, cache it immediately that becomes possible and we save 20s in my test case. Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-
Benjamin Schubert authored
Further optimisations See merge request !1131
-
Jonathan Maw authored
-
Jonathan Maw authored
-
Jonathan Maw authored
Since junction check-outs are now persistent, there is no need to clean up temporary directories once finished. Now, junction checkouts are stored within the top-level project dir and will be cleaned-up when that directory is removed. This involves changes in: * loader.py: Remove cleanup logic and passing-around of tmpdir. * _project.py: Remove passing around tmpdir and calling loader's cleanup.
-
Jonathan Maw authored
Stage junctions into .bst instead of a tmpdir Closes #895 See merge request !1134
-
This was broken by 5ef19a0b.
-
Valentin David authored
buildstream/_cas/cascache.py: Set 0644 rights to pulled files See merge request !1144
-
James Ennis authored
This commit removes the method ArtifactCache.get_artifact_fullname() and replaces it with Element.get_artifact_name() Given a key, we are now able to construct the full name of any of an element's artifacts.
-
James Ennis authored
-
James Ennis authored
-
James Ennis authored
-
James Ennis authored
This object should be used when we want to handle artifact refs directly from the command line. An ArtifactElementError has also been added to _exceptions.py
-
James Ennis authored
-
James Ennis authored
-
James Ennis authored
* There is no need for this method to use a cas object. * Search for artifact globs in the project's element path * An artifact key is always 64 chars long
-
James Ennis authored
-
James Ennis authored
A CasBasedDirectory object of an artifacts logs can be obtained with ArtifactCache.get_artifacts_log(). This ultimately calls CASCache.get_top_level_dir() to obtain a CasBasedDirectory of an artifact's subdirectory (or subdirectories).
-
James Ennis authored
The loading of elements and the handling of artifacts does not belong in this module. Such logic should be invoked using the Stream API
-
James Ennis authored
This method has been moved to Stream, where is it used there exclusively.
-
James Ennis authored
This commit ensures that CASCache.list_refs(), and ArtifactCache.list_artifacts(), can both handle glob expressions.
-
James Ennis authored
_classify_artifacts() no longer filters glob expressions by first obtaining a list of ALL refs locally cached. We now only obtain refs specified by the glob expression. Furthermore, the Project.element_path is used to start searching for globbed elements as opposed to the Project.directory.
Showing
- buildstream/_artifactcache.py 35 additions, 49 deletionsbuildstream/_artifactcache.py
- buildstream/_artifactelement.py 88 additions, 0 deletionsbuildstream/_artifactelement.py
- buildstream/_cas/cascache.py 35 additions, 10 deletionsbuildstream/_cas/cascache.py
- buildstream/_context.py 9 additions, 6 deletionsbuildstream/_context.py
- buildstream/_exceptions.py 9 additions, 0 deletionsbuildstream/_exceptions.py
- buildstream/_frontend/cli.py 18 additions, 80 deletionsbuildstream/_frontend/cli.py
- buildstream/_loader/loader.py 13 additions, 37 deletionsbuildstream/_loader/loader.py
- buildstream/_loader/metaelement.py 9 additions, 9 deletionsbuildstream/_loader/metaelement.py
- buildstream/_project.py 18 additions, 7 deletionsbuildstream/_project.py
- buildstream/_stream.py 107 additions, 15 deletionsbuildstream/_stream.py
- buildstream/_yaml.py 92 additions, 24 deletionsbuildstream/_yaml.py
- buildstream/element.py 74 additions, 40 deletionsbuildstream/element.py
- tests/artifactcache/pull.py 1 addition, 1 deletiontests/artifactcache/pull.py
- tests/artifactcache/push.py 1 addition, 1 deletiontests/artifactcache/push.py
- tests/frontend/pull.py 72 additions, 0 deletionstests/frontend/pull.py
buildstream/_artifactelement.py
0 → 100644