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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0025159
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2013-11-14 14:562013-12-18 11:44
ReporterjonalegriaesarteView Statuspublic 
Assigned Toshankarb 
PriorityurgentResolutionfixedFixed in Version3.0MP31
StatusclosedFix in branchpiFixed in SCM revision0ca986e840a2
ProjectionnoneETAnoneTarget Version3.0MP31
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0025159: Bad performance executing openView function

DescriptionWhen executing openView function:
OB.Utilities.openView('184', '296', 'Goods Receipt', '95F18AE75A0C4717AFA7F28F3DF7587E');

The following extra query is executed (that is not the normal grid query, because is selecting only the m_inout_id):
select materialmg0_.M_InOut_ID as col_0_0_ from M_InOut materialmg0_ cross join C_DocType documentty1_ where
materialmg0_.C_DocType_ID=documentty1_.C_DocType_ID and (materialmg0_.MovementType in ('V-' , 'V+')) and materialmg0_.Islogistic='N' and
documentty1_.IsReturn='N' and (materialmg
0_.AD_Org_ID in ('E443A31992CB4635AFCAEABE7183CE85' , '0' , 'DC206C91AA6A4897B44DA897936E0EC3' ,
'7BABA5FF80494CAFA54DEBD22EC46F01' , 'BAE22373FEBE4CCCA24517E23F0C8A48' , '19404EA
D144C49A0AF37D54377CF452D' , 'B843C30461EA4501935CB1D125C9C25A' , '2E60544D37534C0B89E765FE29BC0B43')) and
(materialmg0_.AD_Client_ID in ('23C59575B9CF467C9620760EB255B389' , '0')
) order by materialmg0_.DocumentNo, materialmg0_.M_InOut_ID

This query does not have any limit. That's why it is causing bad performance.
Steps To ReproduceWhen executing openView function:
OB.Utilities.openView('184', '296', 'Goods Receipt', '95F18AE75A0C4717AFA7F28F3DF7587E');

The following extra query is executed (that is not the normal grid query, because is selecting only the m_inout_id):
select materialmg0_.M_InOut_ID as col_0_0_ from M_InOut materialmg0_ cross join C_DocType documentty1_ where
materialmg0_.C_DocType_ID=documentty1_.C_DocType_ID and (materialmg0_.MovementType in ('V-' , 'V+')) and materialmg0_.Islogistic='N' and
documentty1_.IsReturn='N' and (materialmg
0_.AD_Org_ID in ('E443A31992CB4635AFCAEABE7183CE85' , '0' , 'DC206C91AA6A4897B44DA897936E0EC3' ,
'7BABA5FF80494CAFA54DEBD22EC46F01' , 'BAE22373FEBE4CCCA24517E23F0C8A48' , '19404EA
D144C49A0AF37D54377CF452D' , 'B843C30461EA4501935CB1D125C9C25A' , '2E60544D37534C0B89E765FE29BC0B43')) and
(materialmg0_.AD_Client_ID in ('23C59575B9CF467C9620760EB255B389' , '0')
) order by materialmg0_.DocumentNo, materialmg0_.M_InOut_ID

This query does not have any limit. That's why it is causing bad performance.
TagsPerformance
Attached Filesdiff file icon Fix25161-25159-25136.diff [^] (4,046 bytes) 2013-11-28 10:15 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00251613.0MP31 closedshankarb Alert Management window's link's bad performance 

-  Notes
(0062396)
shankarb (reporter)
2013-11-27 10:02

Modifications in OB.Utilities.openView

* If recordId is present and direct argument is not provided, it is set to true.
* If recordId is present and singleRecord argument is not present it is set to true.
* This is done to prevent fetching all the records and fetch the particular recordId alone.

Before the fix, even if the recordId was passed, if the direct argument is not provided, it will fetch all the records of the grid, but the record provided will be shown. After the fix, if the recordId is passed, and direct argument is not provided, we set it to true and only that particular record is filtered and fetched. Similarly if the singleRecord argument was not provided, it was not used. But now if the recordId is present, singleRecord is also set to true.

To revert back to the original scenario, the arguments 'direct','singleRecord' has to be set to false. This will again fetch all the records of the grid and select the record passed.
(0062402)
alostale (manager)
2013-11-27 11:32

Postponed to mp31 due to being in closing period for mp30
(0062545)
shankarb (reporter)
2013-12-05 08:13

Repository: erp/devel/pi
Changeset: 0ca986e840a24c89b4b5de3af108ac74f90deabf
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Thu Nov 28 14:43:09 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/0ca986e840a24c89b4b5de3af108ac74f90deabf [^] [^]

Fixes Issue 25161,25159,25136 : openDirectTab and openView optimization

Modifications in OB.Utilities.openDirectTab
* Added a new parameter direct that would enable only to fetch the particular record alone.
* By default it is set to true if recordId argument is present.
* If all data needs to be fetched, the argument should be passed as false.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
---
(0062773)
AugustoMauch (manager)
2013-12-18 11:44

Code reviewed and verified in pi@469ba15fbba3

- Issue History
Date Modified Username Field Change
2013-11-14 14:56 jonalegriaesarte New Issue
2013-11-14 14:56 jonalegriaesarte Assigned To => AugustoMauch
2013-11-14 14:56 jonalegriaesarte Modules => Core
2013-11-14 14:56 jonalegriaesarte Triggers an Emergency Pack => No
2013-11-14 14:56 jonalegriaesarte Tag Attached: Performance
2013-11-19 17:44 alostale Assigned To AugustoMauch => shankarb
2013-11-21 16:19 jonalegriaesarte Target Version 3.0MP31 => 3.0MP30
2013-11-22 07:25 alostale Relationship added related to 0025161
2013-11-27 06:11 shankarb File Added: Fix25161-25159-25136.diff
2013-11-27 10:02 shankarb Note Added: 0062396
2013-11-27 11:32 alostale Note Added: 0062402
2013-11-27 11:32 alostale Target Version 3.0MP30 => 3.0MP31
2013-11-28 10:15 shankarb File Deleted: Fix25161-25159-25136.diff
2013-11-28 10:15 shankarb File Added: Fix25161-25159-25136.diff
2013-12-05 08:10 shankarb Issue Monitored: AugustoMauch
2013-12-05 08:11 shankarb Review Assigned To => AugustoMauch
2013-12-05 08:12 shankarb Status new => scheduled
2013-12-05 08:12 shankarb fix_in_branch => pi
2013-12-05 08:13 shankarb Note Added: 0062545
2013-12-05 08:13 shankarb Status scheduled => resolved
2013-12-05 08:13 shankarb Fixed in Version => pi
2013-12-05 08:13 shankarb Fixed in SCM revision => https://code.openbravo.com/erp/devel/pi/rev/0ca986e840a2 [^]
2013-12-05 08:13 shankarb Resolution open => fixed
2013-12-18 11:44 AugustoMauch Note Added: 0062773
2013-12-18 11:44 AugustoMauch Status resolved => closed
2013-12-18 11:44 AugustoMauch Fixed in Version pi => 3.0MP31


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker