Bugzilla – Attachment 174108 Details for
Bug 37987
Downloading SQL report in .tab format is slow
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37987: Speed up downloading reports in .tab format
Bug-37987-Speed-up-downloading-reports-in-tab-form.patch (text/plain), 1.79 KB, created by
Paul Derscheid
on 2024-11-07 10:34:36 UTC
(
hide
)
Description:
Bug 37987: Speed up downloading reports in .tab format
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2024-11-07 10:34:36 UTC
Size:
1.79 KB
patch
obsolete
>From 972194382363f892a5cb72d1cc33bf10ae67655a Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Tue, 24 Sep 2024 15:00:10 +0300 >Subject: [PATCH] Bug 37987: Speed up downloading reports in .tab format > >Downloading SQL report in .tab format was significantly >slower after changes made in bug 37382. Apparently using >HTML::Scrubber to redeclare content variable after >mapping it is slow. Instead sending whole map function >as parameter to module speeds up downloading to couple >of seconds as it was before. > >To test: >1. Find or create report that returns several thousand rows >(e.g. SELECT * FROM items LIMIT 4000). >2. Run report and attempt to download it as .tab file. >=> Notice that this takes a lot of time (around 20 seconds). >3. Apply this patch. >4. Download report again. >=> Dowloading should now take couple second. >=> Confirm that the content of .tab file still contains table >data. > >Sponsored-by: Koha-Suomi Oy >Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> >--- > reports/guided_reports.pl | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index b974761bf5..e045ad280d 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -639,8 +639,7 @@ elsif ($op eq 'export'){ > $content .= join("\t", header_cell_values($sth)) . "\n"; > $content = $scrubber->scrub( Encode::decode( 'UTF-8', $content ) ); > while ( my $row = $sth->fetchrow_arrayref() ) { >- $content .= join( "\t", map { $_ // '' } @$row ) . "\n"; >- $content = $scrubber->scrub( $content ); >+ $content .= $scrubber->scrub( join( "\t", map { $_ // '' } @$row ) ) . "\n"; > } > } else { > if ( $format eq 'csv' ) { >-- >2.39.5
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 37987
:
171924
|
171982
| 174108