Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0034642 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Localization Pack: Spain] AEAT 340 | major | always | 2016-11-28 09:32 | 2016-12-01 09:49 | |||
Reporter | malsasua | View Status | public | |||||
Assigned To | Sanjota | |||||||
Priority | high | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | d4a1d6451a61 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 32 bit | Database | PostgreSQL | Java version | 1.6.0_18 | |||
OS Version | Community Appliance | Database version | 8.3.9 | Ant version | 1.7.1 | |||
Product Version | SCM revision | |||||||
Regression date | ||||||||
Regression introduced by commit | ||||||||
Regression level | ||||||||
Review Assigned To | aferraz | |||||||
Regression introduced in release | ||||||||
Summary | 0034642: performance problem with "create register book" process | |||||||
Description | in one environment with close to 3000 invoices, the "create register book" process is very slow (more than 40 minutes) | |||||||
Steps To Reproduce | in environment with more than 3000 invoices, run "create register book" process the process is slow because it is computing the next line of process: https://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/file/c4f1320e3bb9/src/org/openbravo/module/aeat340/es/api/year2012/AEAT340Report_2012APRMDao.java#l108 [^] | |||||||
Proposed Solution | Replace the constructor on the ./org.openbravo.module.aeat340.es/src/org/openbravo/module/aeat340/es/bean/PaymentInfoFor340.java with public PaymentInfoFor340(final String year, final String invoiceId, final BigDecimal paidAmt) { try { OBContext.setAdminMode(true); Invoice inv = OBDal.getInstance().get(Invoice.class, invoiceId); setInvoice(inv); setYear(year); OBCriteria<ReversedInvoice> obCriteria = OBDal.getInstance().createCriteria(ReversedInvoice.class); obCriteria.add(Restrictions.eq(ReversedInvoice.PROPERTY_INVOICE, inv)); obCriteria.setMaxResults(1); List<ReversedInvoice> rInvoice = obCriteria.list(); for (final ReversedInvoice reversedInvoice : rInvoice) { final Date creditMemoDate = reversedInvoice.getReversedInvoice().getInvoiceDate(); final Calendar cal = Calendar.getInstance(); cal.setTime(creditMemoDate); setYear((new Integer(cal.get(Calendar.YEAR)).toString())); break; } } finally { OBContext.restorePreviousMode(); } setPaidAmt(paidAmt); } | |||||||
Tags | Performance | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||
|
Notes | |
(0091883) egoitz (developer) 2016-11-28 10:49 |
With the propesed solution the time has been reduced from 40 minutes to 4 minutes. |
(0091929) hgbot (developer) 2016-11-30 12:15 |
Repository: erp/pmods/org.openbravo.module.aeat340.es Changeset: 1b4f51927d46e34595ce780f26a89ead2c86beae Author: Sanjota <sanjota.nelagi <at> promantia.com> Date: Tue Nov 29 17:05:59 2016 +0530 URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/rev/1b4f51927d46e34595ce780f26a89ead2c86beae [^] Fixes issue 34642: Performance problem with "create register book" process Reduced the process time by changing the code to increase the performance. --- M src/org/openbravo/module/aeat340/es/bean/PaymentInfoFor340.java --- |
(0091930) hgbot (developer) 2016-11-30 12:16 |
Repository: erp/pmods/org.openbravo.module.aeat340.es Changeset: f7663a78ef1a7a2ad62853697f350bfffe9fcc8c Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> Date: Wed Nov 30 11:53:18 2016 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/rev/f7663a78ef1a7a2ad62853697f350bfffe9fcc8c [^] Related to issue 34642: Code review improvements --- M src/org/openbravo/module/aeat340/es/bean/PaymentInfoFor340.java --- |
(0091931) hgbot (developer) 2016-11-30 12:54 |
Repository: erp/pmods/org.openbravo.module.aeat340.es Changeset: d4a1d6451a618e7e1684c9d5ba0b3d51e115d9a5 Author: Sanjota <sanjota.nelagi <at> promantia.com> Date: Tue Nov 29 17:05:59 2016 +0530 URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/rev/d4a1d6451a618e7e1684c9d5ba0b3d51e115d9a5 [^] Fixes issue 34642: Performance problem with "create register book" process Reduced the process time by changing the code to increase the performance. --- M src/org/openbravo/module/aeat340/es/bean/PaymentInfoFor340.java --- |
(0091932) hgbot (developer) 2016-11-30 12:54 |
Repository: erp/pmods/org.openbravo.module.aeat340.es Changeset: 56b811c08b2d9aa35a3900041e34e63cf557ac86 Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> Date: Wed Nov 30 11:53:18 2016 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/rev/56b811c08b2d9aa35a3900041e34e63cf557ac86 [^] Related to issue 34642: Code review improvements --- M src/org/openbravo/module/aeat340/es/bean/PaymentInfoFor340.java --- |
(0091947) hgbot (developer) 2016-12-01 09:36 |
Repository: erp/pmods/org.openbravo.module.aeat340.es Changeset: ebdc2fad12c61d92470149d2f0b40904b8fb6580 Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> Date: Wed Nov 30 12:25:58 2016 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/rev/ebdc2fad12c61d92470149d2f0b40904b8fb6580 [^] Related to issue 34642: Update module version --- M src-db/database/sourcedata/AD_MODULE.xml --- |
(0091948) hgbot (developer) 2016-12-01 09:44 |
Repository: erp/pmods/org.openbravo.module.aeat340.es Changeset: 4ee6c181c2bc2a3fa027394472533993d54ba7dc Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> Date: Wed Nov 30 12:55:05 2016 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/rev/4ee6c181c2bc2a3fa027394472533993d54ba7dc [^] Related to issue 34642: Update module version --- M src-db/database/sourcedata/AD_MODULE.xml --- |
(0091949) aferraz (developer) 2016-12-01 09:49 |
Code review + Testing OK |
(0091950) Sanjota (developer) 2016-12-01 09:49 |
Test plan: In the application install "org.openbravo.module.aeat340.es" and it's dependent modules. Build the application. In Group admin role: Import the dataset present in the module org.openbravo.module.aeat340.es Open the Lanzar Modelo 340 window Click on record present in the window. Run the process "Generar Modelo 340" for that record. Observe that the processing time is reduced comparatively. |
Issue History | |||
Date Modified | Username | Field | Change |
2016-11-28 09:32 | malsasua | New Issue | |
2016-11-28 09:32 | malsasua | Assigned To | => vmromanos |
2016-11-28 09:37 | malsasua | Steps to Reproduce Updated | View Revisions |
2016-11-28 09:37 | malsasua | Tag Attached: Performance | |
2016-11-28 09:39 | malsasua | Resolution time | => 1482015600 |
2016-11-28 10:49 | egoitz | Proposed Solution updated | |
2016-11-28 10:49 | egoitz | Note Added: 0091883 | |
2016-11-28 10:49 | egoitz | Issue Monitored: networkb | |
2016-11-28 12:17 | vmromanos | Assigned To | vmromanos => Sanjota |
2016-11-30 10:41 | Sanjota | Status | new => scheduled |
2016-11-30 12:15 | hgbot | Checkin | |
2016-11-30 12:15 | hgbot | Note Added: 0091929 | |
2016-11-30 12:15 | hgbot | Status | scheduled => resolved |
2016-11-30 12:15 | hgbot | Resolution | open => fixed |
2016-11-30 12:15 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/rev/1b4f51927d46e34595ce780f26a89ead2c86beae [^] |
2016-11-30 12:16 | hgbot | Checkin | |
2016-11-30 12:16 | hgbot | Note Added: 0091930 | |
2016-11-30 12:54 | hgbot | Checkin | |
2016-11-30 12:54 | hgbot | Note Added: 0091931 | |
2016-11-30 12:54 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/rev/1b4f51927d46e34595ce780f26a89ead2c86beae [^] => http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/rev/d4a1d6451a618e7e1684c9d5ba0b3d51e115d9a5 [^] |
2016-11-30 12:54 | hgbot | Checkin | |
2016-11-30 12:54 | hgbot | Note Added: 0091932 | |
2016-12-01 09:36 | hgbot | Checkin | |
2016-12-01 09:36 | hgbot | Note Added: 0091947 | |
2016-12-01 09:44 | hgbot | Checkin | |
2016-12-01 09:44 | hgbot | Note Added: 0091948 | |
2016-12-01 09:49 | aferraz | Review Assigned To | => aferraz |
2016-12-01 09:49 | aferraz | Note Added: 0091949 | |
2016-12-01 09:49 | aferraz | Status | resolved => closed |
2016-12-01 09:49 | Sanjota | Note Added: 0091950 | |
2016-12-12 16:33 | aferraz | Relationship added | related to 0034690 |
Copyright © 2000 - 2009 MantisBT Group |