Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020337Openbravo ERPI. Performancepublic2012-04-24 16:222012-05-29 03:27
alostale 
alostale 
normalmajorhave not tried
closedfixed 
5
 
3.0MP123.0MP12 
Core
No
0020337: Direct navigation should be filtered by record
Direct navigation to a concrete record is slow when destination table has big amount of data.

The problem is because, even we are filtering by a known BP id, we need to know which is its position in grid. So basically, we do query for the known BP (fast), then query for all BPs in the system sorted in the same way they are sorted in grid, and loop over this resultset to find out the position of this BP to know the offset in the grid (slow).
-In an instance with ~600K business partners
-Select an invoice an navigate to its BP through link in invoice header -> it takes ~15s to open BP window consuming CPU.
In most of the cases, when navigating to a known record, user is interested just in that record and not in the rest of them. Furthermore, it is opened in form view so in many cases user won't navigate to grid. For all these cases all the slow part is just an overhead that doesn't provide any benefit to user.

The proposal is to filter for this case just for the known ID having a kind of "implicit filter". The flow would be: when navigating to a known record, it is opened in form view (as it is now); if user goes to grid, only current record is shown and the blue message about "implicit filter by current record" is shown so he's aware he can clean it up to show all the records. In this case he might have the same problem described above.

This change would affect to:
-Direct navigation to a referenced record through link
-Navigation from "linked items"

Note in case of navigating to a subtab, this should be filtered as well as all its ancestors.
Performance
related to defect 0026640pi closed guillermogil On clicking a record from Recent Documents it should open just its record, not the whole window 
? issue-20337.export (21,327) 2012-04-24 17:06
https://issues.openbravo.com/file_download.php?file_id=5165&type=bug
Issue History
2012-04-24 16:22alostaleNew Issue
2012-04-24 16:22alostaleAssigned To => shuehner
2012-04-24 16:22alostaleModules => Core
2012-04-24 17:01alostaleNote Added: 0047926
2012-04-24 17:06alostaleFile Added: issue-20337.export
2012-04-24 17:07alostaleAssigned Toshuehner => alostale
2012-04-24 17:12alostaleTag Attached: Performance
2012-05-03 13:15hgbotCheckin
2012-05-03 13:15hgbotNote Added: 0048326
2012-05-03 13:15hgbotStatusnew => resolved
2012-05-03 13:15hgbotResolutionopen => fixed
2012-05-03 13:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e258509138aca1a444146c7d37d628c76cd38b3d [^]
2012-05-03 13:15hgbotCheckin
2012-05-03 13:15hgbotNote Added: 0048327
2012-05-25 12:09hudsonbotCheckin
2012-05-25 12:09hudsonbotNote Added: 0049002
2012-05-25 12:09hudsonbotCheckin
2012-05-25 12:09hudsonbotNote Added: 0049003
2012-05-28 11:39AugustoMauchNote Added: 0049345
2012-05-28 11:39AugustoMauchStatusresolved => new
2012-05-28 11:39AugustoMauchResolutionfixed => open
2012-05-28 12:24hgbotCheckin
2012-05-28 12:24hgbotNote Added: 0049351
2012-05-28 12:24hgbotStatusnew => resolved
2012-05-28 12:24hgbotResolutionopen => fixed
2012-05-28 12:24hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/e258509138aca1a444146c7d37d628c76cd38b3d [^] => http://code.openbravo.com/erp/devel/pi/rev/ff800550e531852e8aa94f79442e00ebccfae1d2 [^]
2012-05-28 12:29AugustoMauchNote Added: 0049353
2012-05-28 12:29AugustoMauchStatusresolved => closed
2012-05-28 12:29AugustoMauchFixed in Version => 3.0MP12
2012-05-29 03:27hudsonbotCheckin
2012-05-29 03:27hudsonbotNote Added: 0049389
2014-05-23 12:49guillermogilRelationship addedrelated to 0026640

Notes
(0047926)
alostale   
2012-04-24 17:01   
Test plan for this issue is described in TestLink (http://tools.openbravo.com:8891/testlink [^]) under 3.0 Test Suite > Direct Navigation

Regression risk of this fix is medium as it modifies navigation and datasources which are very central components of Openbravo 3. Though all use cases should be covered by defined test plan.

The code will be pushed to pi within mp12.
(0048326)
hgbot   
2012-05-03 13:15   
Repository: erp/devel/pi
Changeset: e258509138aca1a444146c7d37d628c76cd38b3d
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Apr 24 17:05:19 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e258509138aca1a444146c7d37d628c76cd38b3d [^]

fixed issue 020337: Direct navigation should be filtered by record

 Direct and linked items navigation is now filtered by the selected record, this
 improves perfomance because it is not needed to retrieve all records in grid to
 calculate selected recod position in grid.

---
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_REF_LIST.xml
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-linked-items.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-view-manager.js
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonUtils.java
---
(0048327)
hgbot   
2012-05-03 13:15   
Repository: erp/devel/pi
Changeset: 5b9a10923e6bdd3fda91305168291d2b62b0bb06
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Apr 25 16:34:47 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5b9a10923e6bdd3fda91305168291d2b62b0bb06 [^]

related to issue 020337: Don't show and hide message when navigating

 The grid view is shown briefly first (with the blue message) and is then
 quickly replaced by the form view.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
---
(0049002)
hudsonbot   
2012-05-25 12:09   
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/5401e185a8b0 [^]

Maturity status: Test
(0049003)
hudsonbot   
2012-05-25 12:09   
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/5401e185a8b0 [^]

Maturity status: Test
(0049345)
AugustoMauch   
2012-05-28 11:39   
Code review:
- In the setSingleRecordFilterMessage function, OBUIAPP_SingleRecordFilterMsg message is being shown regardless of the value of the OBUIAPP_ShowSingleRecordFilterMsg property.
(0049351)
hgbot   
2012-05-28 12:24   
Repository: erp/devel/pi
Changeset: ff800550e531852e8aa94f79442e00ebccfae1d2
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon May 28 12:22:58 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ff800550e531852e8aa94f79442e00ebccfae1d2 [^]

Fixes issue 20337: Message shown if OBUIAPP_ShowSingleRecordFilterMsg is true

Now, before showing the message, the value of the OBUIAPP_ShowSingleRecordFilterMsg property is checked.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
---
(0049353)
AugustoMauch   
2012-05-28 12:29   
Code review and verified in pi@ff800550e531
(0049389)
hudsonbot   
2012-05-29 03:27   
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/ced2fdfb9aee [^]

Maturity status: Test