Skip to content

Commit bf3c487

Browse files
authored
Optimize peak heap usage (#1858)
* asynchronous PackageGraph construction and precaching * checkpoint * cleanup * checkpoint * Run tools more asynchronously * Enhacements and dropping of Future.wait * dartfmt * Rate-limit the number of tools in flight * checkpoint * Workaround for duplicate ResovledLibraryResult objects * Patch up merge problem and rebuild test package docs * Use maps to avoid having to filter results * dartfmt and review comments * Update test package docs again (quotation marks different in stable branch) * Clear pubspec overrides (this will only work in sdk-analyzer Travis) * Change sdk test branch to master (analyzer-0.33 not integrated yet) * Set correct analyzer version * Eliminate initialization race where analyzer might not find all the files in time for empty packages * Update analyzer requirement * Fix merge error * Optimize peak heap usage * Fix bug in library count * Fix embedder and refactor file generation * Review comments
1 parent 9ad4ce8 commit bf3c487

File tree

3 files changed

+248
-141
lines changed

3 files changed

+248
-141
lines changed

lib/dartdoc.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@ class Dartdoc extends PackageBuilder {
115115

116116
seconds = _stopwatch.elapsedMilliseconds / 1000.0;
117117
logInfo(
118-
"Documented ${packageGraph.publicLibraries.length} public librar${packageGraph.publicLibraries.length == 1 ? 'y' : 'ies'} "
118+
"Documented ${packageGraph.localPublicLibraries.length} public librar${packageGraph.localPublicLibraries.length == 1 ? 'y' : 'ies'} "
119119
"in ${seconds.toStringAsFixed(1)} seconds");
120120
return new DartdocResults(
121121
config.topLevelPackageMeta, packageGraph, outputDir);
122122
}
123123

124124
Future<DartdocResults> generateDocs() async {
125125
DartdocResults dartdocResults = await generateDocsBase();
126-
if (dartdocResults.packageGraph.publicLibraries.isEmpty) {
126+
if (dartdocResults.packageGraph.localPublicLibraries.isEmpty) {
127127
throw new DartdocFailure(
128128
"dartdoc could not find any libraries to document");
129129
}

0 commit comments

Comments
 (0)