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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030586
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Modules] Initial data loadmajoralways2015-08-14 14:042015-09-11 06:33
ReportergorkaionView Statuspublic 
Assigned Toaferraz 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionb4dbd8ccb5ca
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version
OS VersionDatabase version9.3Ant version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned Todmiguelez
Regression introduced in release
Summary

0030586: Performance issues in IDL for Variants

DescriptionThere are performance issues in the IDL for Variants module when having variant characteristics with a high number of available values.

Having a Color characteristic with ~ 1500 values and a Size characteristic with ~ 20 values.

The import of generic products adding those characteristics as variants takes ~ 15 seconds for each product.
The import of variants for those products also takes several seconds when they shouldn't.
Steps To ReproduceCreate a characteristic color with 1500 values.
Create a characteristic size with 20 values.
Create a csv file with 10 products using those characteristics as variants.
Import the file and check the times.

It might be necessary to add some log information to the ImportProduct class.
Proposed SolutionAfter a simple research the following issues have been detected:
- For each generic all the available values of the characteristics are loaded in the Characteristic Conf tab. This is managed by the ProductCharacteristicEventHandler event handler. The generation of those records is expected but the flush after this event handler is very slow as all the conf records (~ 1500) are loaded in the session.
- When the variants are created a copy of the generic product is done copying all the children entities. This also copies the Conf values of the generic product. These values should be deleted and removed from the session.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0030726 closedgorkaion Implement is explode configuration tab 

-  Notes
(0080059)
gorkaion (manager)
2015-09-03 16:43

After implementing feature requests 0030724 and 0030726 and configuring the characteristic color to not exploding the configuration tab the time per product is reduced to ~ 150ms
(0080195)
hgbot (developer)
2015-09-07 13:38

Repository: erp/pmods/org.openbravo.idl.variants
Changeset: b922baccc06a6b6d5641da0b18e944c84e4e509f
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Sep 04 14:49:04 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.idl.variants/rev/b922baccc06a6b6d5641da0b18e944c84e4e509f [^]

Related to issue 30586: Performance problems in ProductCharacteristicEventHandler

Remove ProductCharacteristicConf list from copied Product in ImportProduct process.

---
M src/org/openbravo/idl/variants/ImportProduct.java
---
(0080285)
hgbot (developer)
2015-09-09 17:45

Repository: erp/devel/pi
Changeset: b4dbd8ccb5cafdc7be74b5a94d13c249f7f3a439
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Sep 04 14:47:22 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b4dbd8ccb5cafdc7be74b5a94d13c249f7f3a439 [^]

Fixes issue 30586: Performance problems in ProductCharacteristicEventHandler

Many loops inside ProductCharacteristicEventHandler have been replaced or removed.
Loops to check if there is any wrong result, have been replaced with a unique result query.
Loops inside getValuesToAdd method have been replaced with a query and results will be returned with a ScrollableResults.
Loop to retrieve existingValues has been replaced with a query.

---
M src/org/openbravo/event/ProductCharacteristicEventHandler.java
---
(0080287)
dmiguelez (developer)
2015-09-09 17:54

Code Review + Testing Ok
(0080321)
hudsonbot (developer)
2015-09-11 06:33

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/2828f6cbe752 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-08-14 14:04 gorkaion New Issue
2015-08-14 14:04 gorkaion Assigned To => jonalegriaesarte
2015-08-14 14:04 gorkaion Description Updated View Revisions
2015-08-14 14:04 gorkaion Proposed Solution updated
2015-08-14 14:43 maite Assigned To jonalegriaesarte => Triage Finance
2015-08-14 14:43 maite Issue Monitored: networkb
2015-08-14 14:46 maite Priority normal => urgent
2015-09-02 11:10 vmromanos Status new => scheduled
2015-09-02 11:10 vmromanos Assigned To Triage Finance => aferraz
2015-09-03 16:41 gorkaion Relationship added related to 0030726
2015-09-03 16:43 gorkaion Note Added: 0080059
2015-09-07 13:38 hgbot Checkin
2015-09-07 13:38 hgbot Note Added: 0080195
2015-09-09 17:45 hgbot Checkin
2015-09-09 17:45 hgbot Note Added: 0080285
2015-09-09 17:45 hgbot Status scheduled => resolved
2015-09-09 17:45 hgbot Resolution open => fixed
2015-09-09 17:45 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b4dbd8ccb5cafdc7be74b5a94d13c249f7f3a439 [^]
2015-09-09 17:54 dmiguelez Review Assigned To => dmiguelez
2015-09-09 17:54 dmiguelez Note Added: 0080287
2015-09-09 17:54 dmiguelez Status resolved => closed
2015-09-11 06:33 hudsonbot Checkin
2015-09-11 06:33 hudsonbot Note Added: 0080321


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker