Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0049119
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2022-04-25 11:592022-05-06 00:21
ReportergorkaionView Statuspublic 
Assigned ToTriage Platform Base 
PriorityhighResolutionfixedFixed in VersionPR22Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0049119: Redundant PDF generation printing documents with multiple selection

DescriptionReviewing a performance problem while printing invoices using the toolbar standard print button I have noticed that each selected invoice is generated individually and later a bigger pdf with all invoices.

The individual PDFs consume a lot of time to generate but are discarded since the jasperPrint object is used to generate the complete pdf.
Steps To Reproduce1. Go to Sales Invoice window.
2. Select several invoices.
3. Click on the Print button and select the just print option.
3. Check in the attachments tmp folder that a PDF is generated for each selected invoice.
4. Later a single PDF containing all the invoices is downloaded.
5. Finally all the PDFs are removed.
Proposed SolutionRemove the call to saveTempReport on PrintController

https://gitlab.com/openbravo/product/openbravo/-/blob/master/src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java#L245 [^]

This call is not needed at all since the printReports method is using the jrPrintReports Collection uses the jasperPrint objects generated for each invoice in the line 236.

By removing this line the time to generate the full PDF is reduced to almost half the time.

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0136840)
hgbot (developer)
2022-04-28 18:07

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/579 [^]
(0136996)
hgbot (developer)
2022-05-06 00:21

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/579 [^]
(0136997)
hgbot (developer)
2022-05-06 00:21

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 0dc2e4bbf07a444740a72239b7160244480d59e5
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 06-05-2022 00:20:36
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/0dc2e4bbf07a444740a72239b7160244480d59e5 [^]

Fixes ISSUE-49119: Prevents unneded pdf generation when printing multiple documents

When several records are selected and then clicking on the Print toolbar button, a single document is download,
and each document is attached to the records it belongs to if that option is chosen. During that process a copy of
each report is being stored in a temporary file, but apparently then that copy is not used.

Skipping the creation of those copies will save quite some time (50% estimated)

---
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
---

- Issue History
Date Modified Username Field Change
2022-04-25 11:59 gorkaion New Issue
2022-04-25 11:59 gorkaion Assigned To => Triage Platform Base
2022-04-25 11:59 gorkaion Modules => Core
2022-04-25 11:59 gorkaion Triggers an Emergency Pack => No
2022-04-28 11:05 martinsdan Issue Monitored: martinsdan
2022-04-28 18:07 hgbot Note Added: 0136840
2022-05-06 00:21 hgbot Resolution open => fixed
2022-05-06 00:21 hgbot Status new => closed
2022-05-06 00:21 hgbot Note Added: 0136996
2022-05-06 00:21 hgbot Fixed in Version => PR22Q3
2022-05-06 00:21 hgbot Note Added: 0136997


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker