-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Config] additions from ResourceWatcher #4619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…FilteredChilds method
Makes sure that directory and the file resources with the same name will have different ids
file resource existence check shouldn't return true if there's directory with same name instead of file.
* fixed DELETED event when starting to watch a file that does not exist yet * fixed files that are deleted and then re-created Conflicts: src/Symfony/Component/ResourceWatcher/StateChecker/ResourceStateChecker.php tests/Symfony/Tests/Component/ResourceWatcher/StateChecker/DirectoryStateCheckerTest.php tests/Symfony/Tests/Component/ResourceWatcher/StateChecker/FileStateCheckerTest.php
@@ -34,6 +34,82 @@ public function __construct($resource, $pattern = null) | |||
} | |||
|
|||
/** | |||
* Returns the list of filtered file and directory childs of directory resource. | |||
* | |||
* @return array An array of files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ return should be FilesystemIterator[] as its an array of FilesystemIterator objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sstok no, it's an array in any case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a large number of Components that us it :) Templating, Translator, Config, Console, DepencyInjection, Routing, Security.
Use this regex @(return|param)\s+[\w\d]+\[\]
to search there usage.
Commits ------- 241aa92 [Config] added existence check to some resource methods 56b60c8 [Config] use is_file in FileResource::exists() ff9c132 [Config] added type prefixes to resource ids ece489f [Config] skip dots in getFilteredChilds() (fixes test suite on Linux) c9eaa72 [Config] made ResourceInterface extends Serializable d7c24eb [Config] added new methods and their tests to File and Directory resources 9fe0d00 [Config] update FileResourceTest 45a45ba [Config] updated DirectoryResource tests 1f9ba38 [Config] getFilteredChildResources() method added to DirectoryResource 6b39688 [Config] moved DirectoryResource childs retrieving to the special getFilteredChilds method 45df2e6 [Config] updated resources API to be more explicit Discussion ---------- [Config] additions from ResourceWatcher Extracted `Config` component changes from `ResourceWatcher` component. --------------------------------------------------------------------------- by travisbot at 2012-06-20T08:27:30Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1662786) (merged 241aa92 into 092b5dd).
This has been reverted as it causes many problems. Must be reworked before being remerged for 2.1.0 beta2. |
I have had time to investigate further but it seems that this also slows things down a lot. |
could the performance issue be caused by all the calls to clearstatcache done for the DirectoryResource on each file in it ? |
@stof Could be, is it really necessary to also clear the realpath cache?? |
Extracted
Config
component changes fromResourceWatcher
component.