Why does JViewHTML->render() use getPath?

81 views
Skip to first unread message

garyamort

unread,
Jun 25, 2012, 12:50:24 PM6/25/12
to joomla-de...@googlegroups.com
I'm curious why a call to getPath is even used in render?


$restorePath = set_include_path(implode(';',$this->getPaths()));
...
set_include_path($restorePath);

Replacing to $path = $this->getPath($this->getLayout()); 

Would replace the PHP functionality being called in getPath with the equivalent C functionality used by include.

I understand that using include with the entire include path can be slower then including a file directly, but if you override the path so it's only the one your interested in, using the built in functionality instead of calling a bunch of PHP file_exists functions should be faster.  Am I wrong and even with a limited include path it's still faster to use file_exists?




Reply all
Reply to author
Forward
0 new messages