anchor.diff:     * priority first.
      */
     Future<Null> _run() async {
  +    Stopwatch timer = new Stopwatch()..start();
       PerformanceLogSection analysisSection;
       while (true) {
  -      // Pump the event queue to allow IO and other asynchronous data
  -      // processing while analysis is active. For example Analysis Server
  -      // needs to be able to process `updateContent` or `setPriorityFiles`
  -      // requests while background analysis is in progress.
  -      //
  -      // The number of pumpings is arbitrary, might be changed if we see that
  -      // analysis or other data processing tasks are starving. Ideally we
  -      // would need to be able to set priority of (continuous) asynchronous
  -      // tasks.
  -      await _pumpEventQueue(128);
  +      // Pump the event queue.
  +      if (timer.elapsedMilliseconds > _MS_BEFORE_PUMPING_EVENT_QUEUE) {
  +        await _pumpEventQueue(_NUMBER_OF_EVENT_QUEUE_PUMPINGS);
  +        timer.reset();
  +      }
   
         await _hasWork.signal;
   
  
positive.code:  * work with the highest priority is performed first.
   */
  class AnalysisDriverScheduler {
    final PerformanceLog _logger;
    final List<AnalysisDriver> _drivers = [];
    final Monitor _hasWork = new Monitor();
  
negative.code:   _FilesReferencingNameTask(this.driver, this.name);
  
    /**
     * Perform a single piece of work, and either complete the [completer] and
     * return `true` to indicate that the task is done, return `false` to indicate
     * that the task should continue to be run.
     */
    Future<bool> perform() async {
      // Prepare files to check.
      if (filesToCheck.isEmpty) {
        Set<String> newFiles = driver.addedFiles.difference(checkedFiles);
        filesToCheck.addAll(newFiles);
      }
  
      // If no more files to check, complete and done.
      if (filesToCheck.isEmpty) {
        completer.complete(referencingFiles);
        return true;
      }
  
      // Check the next file.
      String path = filesToCheck.removeLast();
      FileState file = driver._fsState.getFileForPath(path);
      if (file.referencedNames.contains(name)) {
        referencingFiles.add(path);
      }
      checkedFiles.add(path);
  
      // We're not done yet.
      return false;
  