richthegeek / phpsass

A compiler for SASS/SCSS written in PHP, brought up to date (approx 3.2) from a fork of PHamlP: http://code.google.com/p/phamlp/
http://phpsass.com/
382 stars 83 forks source link

Improve performance in SVN environments / find_file #100

Closed lochmueller closed 11 years ago

lochmueller commented 11 years ago

Hey guys...

today i start to profile the PHP Sass with xdebug. I found a performance issue for SVN environments in the SassFile->find_file method. I have only one SASS file (+ compass files) and the project in the SVN.

If the find_file function don't find a file, the function search in subfolders. But.... there is no exclude for hidden folder like ".svn". We reduce the calls of the find_file 22.000 calls to 1900 calls. I add a "substr($file, 0, 1) !== '.'" to the second foreach to exclude hidden folder.

Regards, Tim

PS: attached a before and a after screenshot :)

before after

richthegeek commented 11 years ago

Great find, this should definitely help performance for some situations!