anchor.diff:    @override
     WorkspacePackage findPackageFor(String filePath) {
       path.Context context = provider.pathContext;
  -    Folder folder = provider.getFolder(context.dirname(filePath));
  +    var directoryPath = context.dirname(filePath);
  +
  +    var cachedPackage = _directoryToPackage[directoryPath];
  +    if (cachedPackage != null) {
  +      return cachedPackage;
  +    }
  +
  +    Folder folder = provider.getFolder(directoryPath);
       if (!context.isWithin(root, folder.path)) {
         return null;
       }
  
positive.code:   /// The absolute path to the `bazel-genfiles` folder.
    final String genfiles;
  
    final _bazelCandidateFiles =
        StreamController<BazelFileNotification>.broadcast();
  
  
negative.code:       BazelWorkspacePackage packageRootedHere() {
          List<String> uriParts = (packageUriResolver as BazelPackageUriResolver)
              ._restoreUriParts(root, '${folder.path}/lib/__fake__.dart');
          String packageName;
          if (uriParts != null && uriParts.isNotEmpty) {
            packageName = uriParts[0];
          }
          var package = BazelWorkspacePackage(packageName, folder.path, this);
          _directoryToPackage[directoryPath] = package;
          return package;
        }
  
        // In some distributed build environments, BUILD files are not preserved.
  