[Koha-bugs] [Bug 7511] Caching Templates

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 10 09:43:02 CET 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7511

--- Comment #1 from Paul Poulain <paul.poulain at biblibre.com> 2012-02-10 08:43:02 UTC ---
Yesterday, I had a long trip in a train, so I investigated more, and wrote a
patch.

Just a performance thing: I tried to checkout a book, with and without caching,
on a copy of a real database. The result is absolutly astonishing:

The command run:
perl -d:NYTProf circ/circulation.pl userid=test password=test
borrowernumber=7852 barcode=00519000000272

Without T::T cache =
Profile of circ/circulation.pl for 3.28s (of 4.74s), executing 486760
statements and 88239 subroutine calls in 284 source files and 87 string evals.

With T::T cache = 
Profile of circ/circulation.pl for 2.37s (of 2.83s), executing 144410
statements and 53427 subroutine calls in 293 source files and 74 string evals.

The circulation.tt is one of the largest template we have, the result is ...
well, use the word you want.
I was so surprised that I tried to find a mistake in my test, but could not.
without cache = run the command, run nytprofhtml to generate the result page
with cache =
* run the command once
* check that /tmp now has a cached version
* run the command again and run nytprofhtml to generate the result page

Patch to follow, it's a 2 lines one !

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the Koha-bugs mailing list