Bugzilla – Attachment 171571 Details for
Bug 23685
Exporting report may consume unlimited memory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23685: Don't store ODS content in a variable to save memory
Bug-23685-Dont-store-ODS-content-in-a-variable-to-.patch (text/plain), 1.77 KB, created by
Nick Clemens (kidclamp)
on 2024-09-16 17:47:40 UTC
(
hide
)
Description:
Bug 23685: Don't store ODS content in a variable to save memory
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-09-16 17:47:40 UTC
Size:
1.77 KB
patch
obsolete
>From 821c5b79125daace031dc9db564466cff00ae551 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 25 Jun 2024 21:43:22 +0000 >Subject: [PATCH] Bug 23685: Don't store ODS content in a variable to save > memory > >Just attaching this to start. > >Sponsored-by: Waikato Institute of Technology > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > reports/guided_reports.pl | 19 +++++++++++++------ > 1 file changed, 13 insertions(+), 6 deletions(-) > >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 49687d39886..dacbfd06c4b 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -690,7 +690,11 @@ elsif ($op eq 'export'){ > # Output > binmode(STDOUT); > open $ods_fh, '<', $ods_filepath; >- $content .= $_ while <$ods_fh>; >+ print $input->header( >+ -type => $type, >+ -attachment => $reportfilename >+ ); >+ print $_ while <$ods_fh>; > unlink $ods_filepath; > } > elsif ( $format eq 'template' ) { >@@ -714,11 +718,14 @@ elsif ($op eq 'export'){ > ); > } > } >- print $input->header( >- -type => $type, >- -attachment=> $reportfilename >- ); >- print $content; >+ >+ unless ( $format eq 'ods' ) { >+ print $input->header( >+ -type => $type, >+ -attachment => $reportfilename >+ ); >+ print $content; >+ } > > foreach my $err (@$q_errors, @errors) { > print "# ERROR: " . (map {$_ . ": " . $err->{$_}} keys %$err) . "\n"; >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23685
:
168116
|
168570
|
168577
|
171136
|
171137
|
171138
|
171139
|
171140
|
171141
|
171142
|
171143
|
171144
|
171145
|
171171
|
171172
|
171173
|
171174
|
171175
| 171571 |
171572
|
171573
|
171574
|
171575