From 46f751bd2f1a209849165ef23c6077e04d90a089 Mon Sep 17 00:00:00 2001 From: Yegor Jbanov Date: Tue, 1 Sep 2015 16:58:52 -0700 Subject: [PATCH] feat(docs): document unused reflection info tracking --- TOOLS_DART.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/TOOLS_DART.md b/TOOLS_DART.md index 4f9b5b3179..29b80e4dcb 100644 --- a/TOOLS_DART.md +++ b/TOOLS_DART.md @@ -40,6 +40,16 @@ each level. To reduce noise in the output (for very large apps) it also provides an option to hide libraries that are too small, so you can focus on the biggest contributors. +#### Track unused reflection data + +Call `reflector.trackUsage()` to cause it to track reflection information used +by the application. Reflection information (`ReflectionInfo`) is a data +structure that stores information about your application that Angular uses for +locating DI factories, generated change detectors and other code related to a +given type. After exercising your application, call `reflector.listUnusedKeys()` +to get a list of types and functions whose reflection information was retained +but was never used by the application. + #### Use code coverage to find dead code When running in Dartium (or in Dart VM in general) you can request code