Hi, maybe I didn't get it right, but I think http://de3.php.net/manual/en/function.require-once.php could be the right thing instead of http://de3.php.net/manual/en/function.require.php or am I missing something? Greets. Marcus. Marcus Kimpenhaus Polsumer Str. 56 45896 Gelsenkirchen +49 (209) 9256075 marcus at kimpenhaus.de Marco Bonetti schrieb: > (CC-ing this to the dev-list) > > Oh wow! I thought php would cache this kind of stuff. One thing we > could do is to implement a template cache: > > - renderWithTemplate('templateName') tries the cache: > - if cache-miss: load the content of the template > (file_get_contents()) file into a variable and store > it in $GLOBALS['rss']->cache['templateName'] > - else: load from the cache. > - Render with eval() or something similar > > How does that sound? > > Or we could move to smarty or a similar "real" templating engine. > > > >>The thing that has been bothering me is the theme engine. This is the >>biggest bottle neck in the code for me. I used the profiler class to >>check. The problem occurs because of the require('...item.php') every >>time an item is rendered. These are expensive because php has to read the >>file from the disk and compile it *every* time it encounters that. So on >>the front page (index.php) it is doing that 100 times. I moved the >>contents of item.php file in the default theme into a function and it >>reduced the execution time of the front page from 2 seconds to 1 second. >>(I have a slow server :) ) Do you have any thoughts about how we could >>reduce the number of require statements? >> >>Sameer >> > > > _______________________________________________ > gregarius-dev mailing list > gregarius-dev at sinless.org > http://sinless.org/mailman/listinfo/gregarius-dev