[Phpmyadmin-devel] about PMA_getImage()

Rouslan, Using is_readable() on the current theme's sprites.lib.php is costly. Can't we just assume that the file is there (therefore making it mandatory for all themes) ? -- Marc Delisle http://infomarc.info

On Tue, 2011-10-04 at 06:13 -0400, Marc Delisle wrote:
Rouslan,
Using is_readable() on the current theme's sprites.lib.php is costly. Can't we just assume that the file is there (therefore making it mandatory for all themes) ?
We could, but we'll lose compatibility with older themes. The idea in my implementation was to also allow for better backwards compatibility. I profiled the generation of the css file though XDEBUG and on my system is_readable() seems to only take 2 uS per call, which doesn't seem like much to me. Or am I missing something? Rouslan

Rouslan Placella a écrit :
On Tue, 2011-10-04 at 06:13 -0400, Marc Delisle wrote:
Rouslan,
Using is_readable() on the current theme's sprites.lib.php is costly. Can't we just assume that the file is there (therefore making it mandatory for all themes) ?
We could, but we'll lose compatibility with older themes. The idea in my implementation was to also allow for better backwards compatibility.
We don't currently have compatibility with older themes; just have a look at http://demo.phpmyadmin.net/master and try older themes.
I profiled the generation of the css file though XDEBUG and on my system is_readable() seems to only take 2 uS per call, which doesn't seem like much to me. Or am I missing something?
Ok, then it's not as costly as I imagined. -- Marc Delisle http://infomarc.info

Hi Dne Tue, 04 Oct 2011 16:56:25 +0100 Rouslan Placella <rouslan@placella.com> napsal(a):
On Tue, 2011-10-04 at 06:13 -0400, Marc Delisle wrote:
Rouslan,
Using is_readable() on the current theme's sprites.lib.php is costly. Can't we just assume that the file is there (therefore making it mandatory for all themes) ?
We could, but we'll lose compatibility with older themes. The idea in my implementation was to also allow for better backwards compatibility.
Well I think much more would be needed to have compatiblity with older themes...
I profiled the generation of the css file though XDEBUG and on my system is_readable() seems to only take 2 uS per call, which doesn't seem like much to me. Or am I missing something?
Yes, it should not be expensive as all this is cached by OS. -- Michal Čihař | http://cihar.com | http://blog.cihar.com
participants (3)
-
Marc Delisle
-
Michal Čihař
-
Rouslan Placella