Start implementing deserializer
diff --git a/main.go b/main.go
index d9e2676..912cca1 100644
--- a/main.go
+++ b/main.go
@@ -17,6 +17,7 @@
cpuprofile string
heapprofile string
katiStatsFlag bool
+ loadJson string
saveJson string
)
@@ -29,6 +30,7 @@
flag.IntVar(&jobsFlag, "j", 1, "Allow N jobs at once.")
+ flag.StringVar(&loadJson, "load_json", "", "")
flag.StringVar(&saveJson, "save_json", "", "")
flag.StringVar(&cpuprofile, "kati_cpuprofile", "", "write cpu profile to `file`")
@@ -91,6 +93,12 @@
func getDepGraph(clvars []string, targets []string) ([]*DepNode, Vars) {
startTime := time.Now()
+ if loadJson != "" {
+ n, v := LoadDepGraphFromJson(loadJson)
+ LogStats("deserialize time: %q", time.Now().Sub(startTime))
+ return n, v
+ }
+
bmk := getBootstrapMakefile(targets)
var mk Makefile