Consider adding a pkl cache to mamba's transformations.
My nasty, massive repo has the following speedup when using pkl:
Before: 853 examples ran (156 pending) in 1.5438 seconds
After: 853 examples ran (156 pending) in 1.1454 seconds
(~25% faster)
My diff looks like this:
@pickle_cache.cache_from_file('mamba_spec')
def _parse_and_transform_ast(self, path):
with open(path) as f:
# (...snip...)
Mamba's requirements are pretty straightforward (eg, function of only "path" and mamba's version number) and so it ought to be easy to accomplish in fewer lines.
Consider adding a pkl cache to mamba's transformations.
My nasty, massive repo has the following speedup when using pkl: Before: 853 examples ran (156 pending) in 1.5438 seconds After: 853 examples ran (156 pending) in 1.1454 seconds (~25% faster)
My diff looks like this:
Where
pickle_cache.cache_from_file()
is defined here: https://github.com/PhilHarnish/forge/blob/master/src/data/pickle_cache.py tl;dr: ifpath
is unmodified then the AST is pulled from pkl.Mamba's requirements are pretty straightforward (eg, function of only "path" and mamba's version number) and so it ought to be easy to accomplish in fewer lines.