Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2022-03-21 12:232022-04-06 16:22
ReporteridiezView Statuspublic 
Assigned Torqueralta 
PriorityhighResolutionfixedFixed in VersionRR22Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0048850: Performance JSONProcessSimple, request to load AWO tasks

DescriptionVersion: Openrbavo version 3.0 PR20Q4.
Steps To ReproduceI 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();
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);
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

With the change made:

5674 MILISECONDS kill EXEC of taskprovider
5674 MILISECONDS before second tostring
12528 MILISECONDS after second tostring
12634 MILISECONDS after substring

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 SolutionDiff proposed by the client
TagsNo tags attached.
Attached Filesdiff file icon jsonprocesssimple.diff [^] (880 bytes) 2022-03-21 12:23 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
hgbot (developer)
2022-03-30 17:24

Merge Request created: [^]
hgbot (developer)
2022-04-06 16:21

Directly closing issue as related merge request is already approved.

Repository: [^]
Changeset: be864979a5191e7c09f86a643ba8541b5b4c4736
Author: Rafael Queralta <>
Date: 06-04-2022 14:21:41
URL: [^]

Fixed BUG-48850: Removed the slowness in the .toString of the JSON call

M src/org/openbravo/mobile/core/process/
hgbot (developer)
2022-04-06 16:22

Merge request merged: [^]

- 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: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 Note Added: 0136183
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
Powered by Mantis Bugtracker