Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0049558 | Retail Modules | Web POS | public | 2022-06-15 11:28 | 2022-08-22 14:23 |
|
Reporter | AugustoMauch | |
Assigned To | AugustoMauch | |
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0049558: Performance problem on LabelsComponent.getMobileAppDependantModuleIdList |
Description | A client recently had some performance problem caused in part by the implementation of the LabelsComponent.getMobileAppDependantModuleIdList. That method is invoked every time a user opens the login screen, as part of the request done to MobileCoreLoginUtilsServlet. Given a module id, the method returns the list of modules that depend from it.
There are two problems in that method:
- Even though that information is not going to change until a new module is installed (and that requires rebuilding the app and restarting tomcat), it is computed everytime, when it could be cached
- At some point the method wants to check if two modules are the same, and instead of comparing their IDs, it is comparing the whole module object, and doing that requires hibernate to inialize the whole object
|
Steps To Reproduce | This issue is not easy to reproduce because it requires lots of simultaneous login requests on an environment that is already under heavy load.
We were able to find out what the problem was by analyzing the jstack log. You can find in the attached jstack file that there were several threads working on the getMobileAppDependantModuleIdList function, in particular in the BasicLazyInitializer class as a result of comparing whole module objects instead of just their ids |
Proposed Solution | - When comparing modules, compare their ids instead of the whole object
- Cache the list of dependencies of each requested module instead of compute it every time a user logs in |
Additional Information | |
Tags | No tags attached. |
Relationships | depends on | backport | 0050024 | RR22Q2.3 | closed | AugustoMauch | Performance problem on LabelsComponent.getMobileAppDependantModuleIdList | has duplicate | defect | 0049546 | | closed | Retail | the function getDependantModules is not efficient | related to | design defect | 0053470 | | new | Triage Platform Base | Bad translation between the 2 nodes |
|
Attached Files | jstack-2022-06-13_12.45.01.txt (264,932) 2022-06-15 11:28 https://issues.openbravo.com/file_download.php?file_id=17163&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2022-06-15 11:28 | AugustoMauch | New Issue | |
2022-06-15 11:28 | AugustoMauch | Assigned To | => AugustoMauch |
2022-06-15 11:28 | AugustoMauch | Triggers an Emergency Pack | => No |
2022-06-15 11:28 | AugustoMauch | File Added: jstack-2022-06-13_12.45.01.txt | |
2022-06-15 11:31 | AugustoMauch | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=24295#r24295 |
2022-06-15 11:31 | AugustoMauch | Proposed Solution updated | |
2022-06-15 11:31 | AugustoMauch | Status | new => scheduled |
2022-06-15 11:52 | AugustoMauch | Description Updated | bug_revision_view_page.php?rev_id=24297#r24297 |
2022-06-15 11:58 | hgbot | Note Added: 0138364 | |
2022-06-16 18:55 | hgbot | Resolution | open => fixed |
2022-06-16 18:55 | hgbot | Status | scheduled => closed |
2022-06-16 18:55 | hgbot | Fixed in Version | => RR22Q3 |
2022-06-16 18:55 | hgbot | Note Added: 0138444 | |
2022-06-16 18:55 | hgbot | Note Added: 0138445 | |
2022-06-17 07:08 | marvintm | Relationship added | has duplicate 0049546 |
2022-08-22 14:15 | AugustoMauch | Note Added: 0140295 | |
2022-08-22 14:15 | AugustoMauch | Status | closed => new |
2022-08-22 14:15 | AugustoMauch | Resolution | fixed => open |
2022-08-22 14:15 | AugustoMauch | Fixed in Version | RR22Q3 => |
2022-08-22 14:16 | AugustoMauch | Status | new => scheduled |
2022-08-22 14:23 | AugustoMauch | Status | scheduled => resolved |
2022-08-22 14:23 | AugustoMauch | Resolution | open => fixed |
2022-08-22 14:23 | AugustoMauch | Status | resolved => closed |
2024-03-18 13:14 | alostale | Relationship added | related to 0053470 |