Summary: | Performance enhancements for C4::Context and C4::Languages | ||
---|---|---|---|
Product: | Koha | Reporter: | Chris Cormack <chris> |
Component: | Architecture, internals, and plumbing | Assignee: | Paul Poulain <paul.poulain> |
Status: | CLOSED WONTFIX | QA Contact: | Bugs List <koha-bugs> |
Severity: | enhancement | ||
Priority: | PATCH-Sent (DO NOT USE) | CC: | paul.poulain, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 5999, 6193, 7119 | ||
Attachments: |
Proposed Patch
Followup patch Bug 6000 : Performance enhancing |
Description
Chris Cormack
2011-03-29 23:00:43 UTC
This probably needs a decent amount of testing. Created attachment 3514 [details] [review] Proposed Patch Created attachment 3515 [details] [review] Followup patch Updating Version : This ENH will be for Koha 3.8 Bug versionned for master. entries will be made against rel_3_8 once the patch has been applied (see thread about that on koha-devel yesterday) I think we need to define a new helper routine in Context.pm that returns the whole preferences, and memoize that one. The way it is now memoize wont help. I'll send to HDL a proposal. Created attachment 7037 [details] [review] Bug 6000 : Performance enhancing C4::Context.pm Loads all systempreferences at once And uses Memcached to cache them C4::Languages Using List::MoreUtils Memcaching get_langage_description Bug 6000 : Follow up Performance enhancing : C4/Languages.pm removing a call unused to getAllLanguages Doing better job at enabled languages Bug 6000: Rebase against origin/master + 6193 In reply to comment 7 With this code: > my $oldsyspref = C4::Context->preference('SYSPREF'); > C4::Context->set_preference('SYSPREF', 'newvalue'); > my $newsyspref = C4::Context->preference('SYSPREF'); What is the value of $newsyspref, if C4::Context->preference is memoized ? (In reply to comment #8) > In reply to comment 7 > > With this code: > > > my $oldsyspref = C4::Context->preference('SYSPREF'); > > C4::Context->set_preference('SYSPREF', 'newvalue'); > > my $newsyspref = C4::Context->preference('SYSPREF'); > > What is the value of $newsyspref, if C4::Context->preference is memoized ? It's a good question for HDL. I'd personally add a memcached->remove('SYSPREF') in the set_preference routine. (In reply to comment #8) Please read comment #6 as I proposed doing it other way, this time I just rebased against origin/master + 6193 (to be signed off patch). I'm willing to discuss how to implement this on IRC. Setting "in discussion", as other caching-related bugs This patch does not apply now that bug 6193 has been applied. And I think this entry should be dropped in favour of some more granular entries. Marking "failed QA", and I suggest we "abandon" this one |