[Koha-bugs] [Bug 6875] de-nesting C4 packages

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Sep 21 17:36:33 CEST 2011


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

Paul Poulain <paul.poulain at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P5                          |PATCH-Sent
             Status|NEW                         |ASSIGNED
       Patch Status|---                         |Needs Signoff
         AssignedTo|gmcharlt at gmail.com          |paul.poulain at biblibre.com

--- Comment #20 from Paul Poulain <paul.poulain at biblibre.com> 2011-09-21 15:36:33 UTC ---
(In reply to comment #2)
> Moving compilation of the module code from compile to runtime seems a bit
> counter intuitive. Certainly if we start running the code in any kind of
> persistent framework we want to do the opposite.
> One thing that aids maintenenance is to only pollute (I mean import into ) your
> namespace those subroutines that you need. i.e, use Module qw( function1
> function2);

I agree it seems counter intuitive (well, it's illogic in fact ;-) ) However,
as long as we don't have persistency, it's good to have those tweakings, as my
tests shows.

I've attached the 17 patches i've done, and here are some results :

* Biblio.pm is well isolated and load only what's needed
* Members is correctly isolated and doesn't load only what's needed
* Reserves and Circulation still require a lot of investigations. They load
almost everything and it can't be simplified easily. Circulation & Reserve are
loading recursively

Test on mainpage.pl :
Profile of mainpage.pl for 1.08s (of 1.43s), executing 118729 statements and
29826 subroutine calls in 132 source files and 41 string evals.

To compare with the same page before the de-nesting:
Profile of mainpage.pl for 1.73s (of 2.18s), executing 155108 statements and
41041 subroutine calls in 249 source files and 64 string evals.
==> -36379 statements (-24% !)

Test on opac-main.pl
Before de-nesting & cleaning = 
Profile of opac/opac-main.pl for 1.96s (of 2.61s), executing 218971 statements
and 51466 subroutine calls in 248 source files and 61 string evals.
After de-nesting & cleaning =
Profile of opac/opac-main.pl for 1.29s (of 1.88s), executing 182574 statements
and 40411 subroutine calls in 138 source files and 38 string evals.
==> -36397 statements (-16%)


The timings are not fully relevants, they depend on too much things (like mysql
having the data in cache or no).
All tests have been done without any tweaking (ie : no memcache, basic
mysql/apache config...)

> It also flags up to those who come after you how much of that module is used.

??? I don't understand what you mean here ?

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the Koha-bugs mailing list