Koha-clms/reports
Fridolin Somers 04a9bf6b7f Bug 21560: report ODS export optimization
SQL reports can be exported with CSV, TSV of ODS format.
When report has thousands of rows, using ODS format is around 10 times longer than other formats.
It also loads CPU and RAM a lot.

The longest call is expandTable().
I found that the call on OpenOffice-OODoc lib can be optimized.
Based on https://grep.metacpan.org/search?qci=&q=expandTable&qft=&qd=OpenOffice-OODoc&f=examples%2Ftext2table

Test plan :
1) Don't apply patch yet
2) Create a new SQL report : Home > Reports > Create from SQL
3) Enter a SQL that will return thousands of results
4) Run report
5) Click Download > Semicolon separated text (.csv), look execution time
6) Click Download > Open Document Spreadsheet, look execution time
7) Apply patch
8) Redo 5) and 6) and compare times, CSV export should be the same but ODS export should be better

My tests shows 1,5 seconds for CSV export.
And for ODS export : 18 seconds without patch and 8 seconds with patch.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 28edd88483)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0014f64348)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ba64a98d07)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-26 07:30:15 +01:00
..
acquisitions_stats.pl Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
bor_issues_top.pl Bug 17925: Disable debugging in reports/bor_issues_top.pl 2017-05-12 09:09:15 -04:00
borrowers_out.pl Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType 2016-09-08 13:29:22 +00:00
borrowers_stats.pl Bug 22082: ambiguous column in patron stats 2019-01-30 09:47:54 +01:00
cash_register_stats.pl Bug 19551: Fix wrong order of operations in cash register report 2017-12-14 12:04:15 +00:00
cat_issues_top.pl Bug 16653: (QA follow-up) Avoid a warning and remove unused variables 2018-07-04 09:00:47 +02:00
catalogue_out.pl Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
catalogue_stats.pl Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
dictionary.pl Bug 16154: CGI->multi_param - Declare a list 2016-04-26 23:16:42 +00:00
guided_reports.pl Bug 21560: report ODS export optimization 2019-03-26 07:30:15 +01:00
issues_avg_stats.pl Bug 13452: Fix for plack 2017-06-15 15:27:46 -03:00
issues_stats.pl Bug 19671: Map itemtypes to hash for correct display in issues_stats.pl 2018-02-22 00:59:34 +00:00
itemslost.pl Bug 18279: Remove C4::Items::GetLostItems 2017-06-05 11:43:26 -03:00
itemtypes.plugin Bug 20274: Itemtypes report gives zero results if item-level_itypes set to bibliographic records 2019-02-04 10:51:22 +01:00
manager.pl Bug 16154: CGI->multi_param - Declare a list 2016-04-26 23:16:42 +00:00
orders_by_fund.pl Bug 18260: Koha::Biblio - Remove GetBiblio 2017-07-10 13:03:38 -03:00
reports-home.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
reserves_stats.pl Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
serials_stats.pl Bug 15758: Koha::Libraries - Remove GetBranchesLoop 2016-09-08 14:36:02 +00:00
stats.print.pl Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00