diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2018-10-11 08:38:37 -0400 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2018-10-11 08:45:04 -0400 |
commit | dada4e36e6d9a5c4b41bbe1f68389520e7c59ace (patch) | |
tree | 27f3d5451fad7a6c2157965af811a65898704054 /test | |
parent | af5cecd8eec9692f43d04ad53c8f28734012b873 (diff) |
Optimize path handling
- Only set paths that need to be put as a priority
- Clean up paths before leaving API mode
The first point accounted for some performance cost, but the latter one
explains the 40% overhead in test runs: since rebar3 calls rebar3 a lot
with a bunch of fake apps, and that the new mechanism for path handling
by default does not _remove_ paths, it just _orders_ them, we would end
up in a situation where as the tests ran, more and more fake paths would
get added to the VM.
By the time the run was over, all path handling would take longer since
more paths needed filtering every time. By resetting paths at the end of
an API run, we prevent a given 'project' from polluting another one's
runtime and performance once the API successfully returns.
Diffstat (limited to 'test')
-rw-r--r-- | test/rebar_paths_SUITE.erl | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/test/rebar_paths_SUITE.erl b/test/rebar_paths_SUITE.erl index f2832c0..96cda45 100644 --- a/test/rebar_paths_SUITE.erl +++ b/test/rebar_paths_SUITE.erl @@ -212,13 +212,11 @@ check_modules(Config) -> misloaded_mods(_Config) -> Res = rebar_paths:misloaded_modules( - [a,b,c,d,e,f], ["/1/2/3/4", "/1/2/4", "/2/1/1", "/3/4/5"], [{a, "/0/1/2/file.beam"}, - {aa, "/1/2/3/4/file.beam"}, {b, "/1/2/3/4/file.beam"}, {c, "/2/1/file.beam"}, {f, preloaded}, |