Hello Koha-devel,
As I said during last IRC chat, I'm focusing on performance improvement
those weeks.
I've digged into Template::Toolkit, and here
http://search.cpan.org/~abw/Template-Toolkit-2.22/lib/Template/Manual/Config.pod#Caching_and_Compiling_Options
I've found 2 options that look promizing : COMPILE_EXT and COMPILE_DIR
The loading of the template seems to cost 150ms, and I feel that those 2
options could be usefull to speed up the process. Did anyone already saw
this option before ? Is it something worth investigating more ?
Here is the documentation of the 1st option:
COMPILE_EXT
>From version 2 onwards, the Template Toolkit has the ability to compile
templates to Perl code and save them to disk for subsequent use (i.e.
cache persistence). The COMPILE_EXT option may be provided to specify a
filename extension for compiled template files. It is undefined by
default and no attempt will be made to read or write any compiled
template files.
my $template = Template->new({
COMPILE_EXT => '.ttc',
});
If COMPILE_EXT is defined (and COMPILE_DIR isn't, see below) then
compiled template files with the COMPILE_EXT extension will be written
to the same directory from which the source template files were loaded.
Compiling and subsequent reuse of templates happens automatically
whenever the COMPILE_EXT or COMPILE_DIR options are set. The Template
Toolkit will automatically reload and reuse compiled files when it finds
them on disk. If the corresponding source file has been modified since
the compiled version as written, then it will load and re-compile the
source and write a new compiled version to disk.
This form of cache persistence offers significant benefits in terms of
time and resources required to reload templates. Compiled templates can
be reloaded by a simple call to Perl's require(), leaving Perl to handle
all the parsing and compilation. This is a Good Thing.
--
Paul POULAIN
http://www.biblibre.com
Expert en Logiciels Libres pour l'info-doc
Tel : (33) 4 91 81 35 08
_______________________________________________
Koha-devel mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/