[Koha-bugs] [Bug 23685] Exporting report may consume unlimited memory

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Feb 23 02:16:56 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23685

--- Comment #8 from David Cook <dcook at prosentient.com.au> ---
Rewriting OpenOffice::OODoc is not really an option, but that would be the most
"correct" solution I imagine.

However, realistically, we could be more optimal in our current use of
OpenOffice::OODoc. As Paul mentions, it makes no sense to do a
$sth->fetchall_arrayref(), plus building @$ods_content, and then having an
in-memory representation in OpenOffice::OODoc. That's 3x more memory usage than
we need to use.

We should just use something like $sth->fetchrow_hashref or
$sth->fetchrow_arrayref and feed OpenOffice::OODoc row by row. 

--

Note too that the ODS format will have proxy issues for large exports, because
guided_reports.pl will write the ZIP to disk, read the ZIP from disk, write to
STDOUT, and then Plack::App::CGIBin will buffer STDOUT in a temporary file on
disk, and then it will send the whole response all at once to the Apache
reverse proxy.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list