Bläddra i källkod

Quick topsort optimizations

- topsort of an app does a full analysis of all apps to come up with
  their app-level DAG
- each extra_src_dir has its own analysis run
- each extra_src_dir run is simulated as being an app
- we therefore end up doing a lot of useless analysis for single app
  runs

This patch notes runs with 1 or 0 apps and skips doing the topsort
analysis on them, which speeds things up further.
pull/2246/head
Fred Hebert 5 år sedan
förälder
incheckning
cddb3fbd18
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. +2
    -0
      src/rebar_compiler_dag.erl

+ 2
- 0
src/rebar_compiler_dag.erl Visa fil

@ -169,6 +169,8 @@ propagate_stamps(G) ->
%% @doc Return the reverse sorting order to get dep-free apps first. %% @doc Return the reverse sorting order to get dep-free apps first.
%% -- we would usually not need to consider the non-source files for the order to %% -- we would usually not need to consider the non-source files for the order to
%% be complete, but using them doesn't hurt. %% be complete, but using them doesn't hurt.
compile_order(_, AppDefs) when length(AppDefs) =< 1 ->
[Name || {Name, _Path} <- AppDefs];
compile_order(G, AppDefs) -> compile_order(G, AppDefs) ->
Edges = [{V1,V2} || E <- digraph:edges(G), Edges = [{V1,V2} || E <- digraph:edges(G),
{_,V1,V2,_} <- [digraph:edge(G, E)]], {_,V1,V2,_} <- [digraph:edge(G, E)]],

Laddar…
Avbryt
Spara