Openbravo Issue Tracking System - Retail Modules | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0048850 | Retail Modules | Web POS | public | 2022-03-21 12:23 | 2022-04-06 16:22 |
Reporter | idiez | ||||
Assigned To | rqueralta | ||||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | RR22Q3 | |||
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 | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=16792&type=bug | ||||
Issue History | |||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|