long durationMs = System.currentTimeMillis() - beforeCompileMs;
TreeLogger detailBranch = logger.branch(TreeLogger.INFO,
String.format("%.3fs -- Translating Java to Javascript", durationMs / 1000d));
TinyCompileSummary tinyCompileSummary = compilerContext.getTinyCompileSummary();
boolean shouldWarn =
tinyCompileSummary.getTypesForGeneratorsCount() + tinyCompileSummary.getTypesForAstCount()
> 1500;
String recommendation = shouldWarn ? " This module should probably be split into smaller "
+ "modules or should trigger fewer generators since its current size hurts "
+ "incremental compiles." : "";
detailBranch.log(shouldWarn ? TreeLogger.WARN : TreeLogger.INFO, String.format(
"There were %s static source files, %s generated source files, %s types loaded for "
+ "generators and %s types loaded for AST construction. %s",
tinyCompileSummary.getStaticSourceFilesCount(),
tinyCompileSummary.getGeneratedSourceFilesCount(),
tinyCompileSummary.getTypesForGeneratorsCount(), tinyCompileSummary.getTypesForAstCount(),
recommendation));
}