Bug 8997 - Dead code in C4/Language causing useless SQL queries
Summary: Dead code in C4/Language causing useless SQL queries
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Paul Poulain
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-31 17:21 UTC by Paul Poulain
Modified: 2013-12-05 20:06 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 8997: In C4/Language, getTranslatedLanguages calls getAllLanguage, passes it to _build_languages_arrayref, that does nothing of it (1.64 KB, patch)
2012-10-31 17:22 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 8997: Unnecessary call to getAllLanguages (1.86 KB, patch)
2012-11-02 12:26 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Poulain 2012-10-31 17:21:23 UTC
In C4/Language, getTranslatedLanguages calls getAllLanguage, passes it to _build_languages_arrayref, that does nothing of it

removing this dead code will clean & reduce SQL overhead
Comment 1 Paul Poulain 2012-10-31 17:22:30 UTC Comment hidden (obsolete)
Comment 2 Paul Poulain 2012-10-31 17:23:23 UTC
Test plan:
 * apply patch
 * use Koha (with some languages activated on staff & OPAC)

=> you won't see any differences
(i've tested both Plack & CGI)
Comment 3 Jared Camins-Esakov 2012-11-02 12:26:08 UTC
Created attachment 13209 [details] [review]
Bug 8997: Unnecessary call to getAllLanguages

In C4/Language, getTranslatedLanguages calls getAllLanguage, passes it
to _build_languages_arrayref, that does nothing of it. Removing this
dead code will clean & reduce SQL overhead

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
I tried switching between languages and enabling and disabling
languages, and could not see any change with the patch applied.
Comment 4 Jonathan Druart 2012-11-13 15:21:13 UTC
Good catch Paul.
Marked as Passed QA.
Comment 5 Jared Camins-Esakov 2012-11-20 12:35:07 UTC
This patch has been pushed to master.
Comment 6 Paul Poulain 2012-11-20 15:27:56 UTC
Patch pushed to branch 3.10.x
Comment 7 Chris Cormack 2013-04-23 09:51:50 UTC
Released in 3.10.0