From a25932ba6aa84f036e850fc42599b65b3e22945c Mon Sep 17 00:00:00 2001 From: David Kubecka Date: Mon, 23 Mar 2015 11:17:01 +0100 Subject: [PATCH] Compress erlcinfo file less agressively Optimizing for best compression could be very slow for large projects, so optimize rather for the speed. erlcinfo file isn't that huge anyway and moreover difference between levels 2 and 9 isn't that big in practice (although there's quite big difference between level 2 and no compression at all). --- src/rebar_erlc_compiler.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index 7a21df6..5db1eca 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -485,7 +485,7 @@ store_erlcinfo(G, InclDirs) -> Es = lists:map(fun(E) -> digraph:edge(G, E) end, digraph:edges(G)), File = erlcinfo_file(), ok = filelib:ensure_dir(File), - Data = term_to_binary(#erlcinfo{info={Vs, Es, InclDirs}}, [{compressed, 9}]), + Data = term_to_binary(#erlcinfo{info={Vs, Es, InclDirs}}, [{compressed, 2}]), ok = file:write_file(File, Data). %% NOTE: If, for example, one of the entries in Files refers to