Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0048850 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | always | 2022-03-21 12:23 | 2022-04-06 16:22 | |||
Reporter | idiez | View Status | public | |||||
Assigned To | rqueralta | |||||||
Priority | high | Resolution | fixed | Fixed in Version | RR22Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | approved | |||||||
Review Assigned To | ||||||||
OBNetwork customer | OBPS | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0048850: Performance JSONProcessSimple, request to load AWO tasks | |||||||
Description | Version: Openrbavo version 3.0 PR20Q4. | |||||||
Steps To Reproduce | I do not add the different steps, I simply want to comment on a performance problem that the client is reporting to us when loading several tasks of a user in AWO. We have debugged and added logs to see where those performance issues were. So, the java that calls from AWO to load the tasks is the TasksProvider. This extends from JSONProcessSimple, and there we have detected that the slowness is in the .toString of the JSON that it builds. What I don't understand very well is why the following lines/checks are made: String s = exec(jsonsent).toString(); checkTimeout(); if (s.startsWith("{") && s.endsWith("}")) { // write only the properties, brackets are written outside. JSONObject response = new JSONObject(s); JSONObject contextInfo = getContextInformation(); ......... At the first point, it collects the response returned by the exec (in this case the one running in TasksProvider.class), and passes it to a String, just to check if it starts and ends with '{' '}', and then returns to pass that String to JSONObject. So I have made the following change in my local environment: JSONObject response = exec(jsonsent); checkTimeout(); if (response != null) { // write only the properties, brackets are written outside. JSONObject contextInfo = getContextInformation(); ............ With this we save the first .toString, and this lowers the response time to 10 seconds. I attach the times with the standard java, and with the changes made: 5888 MILISECONDS kill EXEC of taskprovider 12436 MILISECONDS finish EXEC tostring 14267 MILISECONDS before second tostring 23214 MILISECONDS after second tostring 24067 MILISECONDS after substring 24881 MILISECONDS after WRITE With the change made: 5674 MILISECONDS kill EXEC of taskprovider 5674 MILISECONDS before second tostring 12528 MILISECONDS after second tostring 12634 MILISECONDS after substring 13372 MILISECONDS after WRITE The client made a small diff with this change to apply it to our client, to see if it helps to load the tasks faster. | |||||||
Proposed Solution | Diff proposed by the client | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
|
![]() |
|
(0136183) hgbot (developer) 2022-03-30 17:24 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/348 [^] |
(0136369) hgbot (developer) 2022-04-06 16:21 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^] Changeset: be864979a5191e7c09f86a643ba8541b5b4c4736 Author: Rafael Queralta <rafaelcuba81@gmail.com> Date: 06-04-2022 14:21:41 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/be864979a5191e7c09f86a643ba8541b5b4c4736 [^] Fixed BUG-48850: Removed the slowness in the .toString of the JSON call --- M src/org/openbravo/mobile/core/process/JSONProcessSimple.java --- |
(0136370) hgbot (developer) 2022-04-06 16:22 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/348 [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2022-03-21 12:23 | idiez | New Issue | |
2022-03-21 12:23 | idiez | Assigned To | => staffrm |
2022-03-21 12:23 | idiez | File Added: jsonprocesssimple.diff | |
2022-03-21 12:23 | idiez | OBNetwork customer | => OBPS |
2022-03-21 12:37 | Practics | Issue Monitored: Practics | |
2022-03-21 15:27 | marvintm | Project | Mantis @ OB => Retail Modules |
2022-03-21 15:27 | marvintm | Triggers an Emergency Pack | => No |
2022-03-21 15:27 | marvintm | Category | Others => Web POS |
2022-03-21 15:27 | marvintm | Type | design defect => defect |
2022-03-22 06:09 | priyam | Assigned To | staffrm => Retail |
2022-03-27 20:59 | rqueralta | Assigned To | Retail => rqueralta |
2022-03-27 21:00 | rqueralta | Status | new => scheduled |
2022-03-28 11:26 | shuehner | Issue Monitored: shuehner | |
2022-03-30 17:24 | hgbot | Merge Request Status | => open |
2022-03-30 17:24 | hgbot | Note Added: 0136183 | |
2022-04-06 16:21 | hgbot | Merge Request Status | open => approved |
2022-04-06 16:21 | hgbot | Resolution | open => fixed |
2022-04-06 16:21 | hgbot | Status | scheduled => closed |
2022-04-06 16:21 | hgbot | Fixed in Version | => RR22Q3 |
2022-04-06 16:21 | hgbot | Note Added: 0136369 | |
2022-04-06 16:22 | hgbot | Note Added: 0136370 |
Copyright © 2000 - 2009 MantisBT Group |