For the record here, a cache is planed once we have a stable version.
Something like what htscanner does, it already caches the entries
(cache + stat check once ttl is over).Just clarification: the caching is there already. :)
But I didn't use any stat calls for sake of KISS.
When cached results expire, the file (if it exists..) is re-scanned.
Maybe someone has better idea. But that remains to be seen. :)
well, some OSes allow subscribing to the notifications from filesystem
*bsd (including macos-x) use kqueue, linux and winnt have different
mechanisms for the same thing
--
Alexey Zakhlestin
http://blog.milkfarmsoft.com/
well, some OSes allow subscribing to the notifications from filesystem
*bsd (including macos-x) use kqueue, linux and winnt have different
mechanisms for the same thing
The question is how expensive are those notifications - i.e. if one has
1000 of them, will it be a trouble for the OS?
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com
well, some OSes allow subscribing to the notifications from filesystem
*bsd (including macos-x) use kqueue, linux and winnt have different
mechanisms for the same thingThe question is how expensive are those notifications - i.e. if one has
1000 of them, will it be a trouble for the OS?
It is not really related to the stat cache but it may need a
clarification. The ini cache works on per directory basis and caches
the entries found in the current dir and the parent directories.
Once the TTL is over, it will check if there is a file in the current
dir and its parent directory (until docroot), just like htaccess.
Having this TTL reduces the performance impact drastically. For
example, htscanner has it set to 5mins by default. For what I heard,
many ISPs kept this default.
Cheers,
--Pierre
well, some OSes allow subscribing to the notifications from filesystem
*bsd (including macos-x) use kqueue, linux and winnt have different
mechanisms for the same thingThe question is how expensive are those notifications - i.e. if one has
1000 of them, will it be a trouble for the OS?It is not really related to the stat cache but it may need a
clarification. The ini cache works on per directory basis and caches
the entries found in the current dir and the parent directories.Once the TTL is over, it will check if there is a file in the current
dir and its parent directory (until docroot), just like htaccess.
Having this TTL reduces the performance impact drastically. For
example, htscanner has it set to 5mins by default. For what I heard,
many ISPs kept this default.
kqueue and "friends" allow you to skip that TTL part alltogether, as
PHP can just register itself as a subscriber to filesystem events in
related directories. If it notices that the file appeared or
disappeared or changed it can react immediately, while still not
making any "active" checks
but, as Stanislav mentioned, we should check how difficult it would be
for the OS to send those notifications
--
Alexey Zakhlestin
http://blog.milkfarmsoft.com/
kqueue and "friends" allow you to skip that TTL part alltogether, as
PHP can just register itself as a subscriber to filesystem events in
related directories. If it notices that the file appeared or
disappeared or changed it can react immediately, while still not
making any "active" checks
(Warning: I never used these systems so I may be mistaken)
Unless they have a local session manager that allows php to register
once, get a SID and re connect on each request to fetch/catch the
notifications, it can't be used. It may be possible to store the
connection data and information in a persistent storage but the
problem of the notifcations remain, how will they be sent to PHP?
The advantage of a TTL system is its extreme simplicity and
portability (cache works per process child and work on every platform
supported by PHP).
Cheers,
--Pierre