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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0025161
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2013-11-15 01:292013-12-18 11:44
ReporterjonalegriaesarteView Statuspublic 
Assigned Toshankarb 
PrioritynormalResolutionfixedFixed in Version3.0MP31
StatusclosedFix in branchFixed 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

0025161: Alert Management window's link's bad performance

DescriptionThere is an issue with the Alert Management window where the link to a specific record would cause an expensive query to fire. For example, if you had
an alert that referenced a specific sales order and you clicked on the link to navigate to that order, then the following query would be executed twice
and the query does not have any limit:

select order0_.C_Order_ID as col_0_0_
from C_Order order0_, C_DocType documentty1_
where order0_.C_DocTypeTarget_ID=documentty1_.C_DocType_ID
and order0_.IsSOTrx='Y'
and documentty1_.IsReturn='N'
and (documentty1_.DocSubTypeSO not like 'OB')
and (order0_.AD_Org_ID in ('20061' , '20063' , '20062' , '20003' , '20002' , '20023' , '20022' , '20025' , '20001' , '20026' , '20064' , '20065' ,
'20066' , '20067' , '20068' , '20052' , '20051' , '20012' , '20011' , '0' , '20016' , '20015' , '20055' , '20056' , '20053' , '20054'))
and (order0_.AD_Client_ID in ('1969' , '0'))
order by order0_.DocumentNo, order0_.C_Order_ID


The function that is used to open the window is : openDirectTab

So, all the function to open tabs and windows should be checked and fixed in order to improve the performance.
Steps To ReproduceThere is an issue with the Alert Management window where the link to a specific record would cause an expensive query to fire. For example, if you had
an alert that referenced a specific sales order and you clicked on the link to navigate to that order, then the following query would be executed twice
and the query does not have any limit:

select order0_.C_Order_ID as col_0_0_
from C_Order order0_, C_DocType documentty1_
where order0_.C_DocTypeTarget_ID=documentty1_.C_DocType_ID
and order0_.IsSOTrx='Y'
and documentty1_.IsReturn='N'
and (documentty1_.DocSubTypeSO not like 'OB')
and (order0_.AD_Org_ID in ('20061' , '20063' , '20062' , '20003' , '20002' , '20023' , '20022' , '20025' , '20001' , '20026' , '20064' , '20065' ,
'20066' , '20067' , '20068' , '20052' , '20051' , '20012' , '20011' , '0' , '20016' , '20015' , '20055' , '20056' , '20053' , '20054'))
and (order0_.AD_Client_ID in ('1969' , '0'))
order by order0_.DocumentNo, order0_.C_Order_ID


The function that is used to open the window is : openDirectTab

So, all the function to open tabs and windows should be checked and fixed in order to improve the performance.
TagsPerformance
Attached Filesdiff file icon Fix25161-25159-25136.diff [^] (4,046 bytes) 2013-11-28 10:14 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00251593.0MP31 closedshankarb Bad performance executing openView function 
related to defect 0025136 closedshankarb Linked items navigation not working as expected (3d level subtab) 

-  Notes
(0062394)
shankarb (developer)
2013-11-27 09:57

Modification done in 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.

Before the fix, even if the recordId was passed, all the records of the grid will be fetched, but the record provided will be shown. After the fix, if the recordId is passed, only that particular record is filtered and fetched.

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

Postponed to mp31 due to being in closing period for mp30
(0062544)
hgbot (developer)
2013-12-05 08:11

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
---
(0062772)
AugustoMauch (developer)
2013-12-18 11:44

Code reviewed and verified in pi@469ba15fbba3

- Issue History
Date Modified Username Field Change
2013-11-15 01:29 jonalegriaesarte New Issue
2013-11-15 01:29 jonalegriaesarte Assigned To => AugustoMauch
2013-11-15 01:29 jonalegriaesarte Modules => Core
2013-11-15 01:29 jonalegriaesarte Triggers an Emergency Pack => No
2013-11-15 01:30 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 0025159
2013-11-26 11:53 alostale Relationship added related to 0025136
2013-11-27 06:11 shankarb File Added: Fix25161-25159-25136.diff
2013-11-27 09:57 shankarb Note Added: 0062394
2013-11-27 11:32 alostale Note Added: 0062401
2013-11-27 11:32 alostale Target Version 3.0MP30 => 3.0MP31
2013-11-28 10:14 shankarb File Deleted: Fix25161-25159-25136.diff
2013-11-28 10:14 shankarb File Added: Fix25161-25159-25136.diff
2013-12-05 08:03 shankarb Issue Monitored: AugustoMauch
2013-12-05 08:07 shankarb Review Assigned To => AugustoMauch
2013-12-05 08:11 hgbot Checkin
2013-12-05 08:11 hgbot Note Added: 0062544
2013-12-05 08:11 hgbot Status new => resolved
2013-12-05 08:11 hgbot Resolution open => fixed
2013-12-05 08:11 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0ca986e840a24c89b4b5de3af108ac74f90deabf [^]
2013-12-18 11:44 AugustoMauch Note Added: 0062772
2013-12-18 11:44 AugustoMauch Status resolved => closed
2013-12-18 11:44 AugustoMauch Fixed in Version => 3.0MP31


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker