Project:
View Revisions: Issue #49558 | [ Back to Issue ] | ||
Summary | 0049558: Performance problem on LabelsComponent.getMobileAppDependantModuleIdList | ||
Revision | 2022-06-15 11:52 by AugustoMauch | ||
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 |
||
Revision | 2022-06-15 11:31 by AugustoMauch | ||
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 logs in Openbravo, 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 |
||
Revision | 2022-06-15 11:31 by AugustoMauch | ||
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 |
||
Revision | 2022-06-15 11:28 by AugustoMauch | ||
Steps To Reproduce | - |
Copyright © 2000 - 2009 MantisBT Group |