Changeset 130

Show
Ignore:
Timestamp:
03/04/08 00:38:51 (10 months ago)
Author:
iteman
Message:

- Improved performance by excluding some files and directories.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/Stagehand/TestRunner/Collector/Common.php

    r120 r130  
    7777    private $_targetPath; 
    7878    private $_isRecursive; 
     79    private $_excludePatterns = array('!^CVS$!', 
     80                                      '!^.svn!', 
     81                                      '!\.swp$!', 
     82                                      '!~$!', 
     83                                      '!\.bak$!', 
     84                                      '!^#.+#$!' 
     85                                      ); 
    7986 
    8087    /**#@-*/ 
     
    316323            if ($files[$i] == '.' || $files[$i] == '..') { 
    317324                continue; 
     325            } 
     326 
     327            foreach ($this->_excludePatterns as $excludePattern) { 
     328                if (preg_match($excludePattern, $files[$i])) { 
     329                    continue 2; 
     330                } 
    318331            } 
    319332