View source | View content page | Page history | Printable version   

Projects:Login Process Perfomance Improvements/Specs


Functional Requirements

The main functional goal of this project is to keep the log-in process of the backend working as usual, but with a better performance in terms of scalability thanks to the changes that will be introduced.

Technical Specs

A set of different sub-tasks will be applied along this project. All these sub-tasks together will bring a general improvement of the log-in process.

Menu Generation Speed Up

One of the most time consuming parts when requesting for the Application component is the generation of the Application Menu. For this reason, the code used to retrieve the available menu elements for a role will be improved as much as possible within the MenuManager class.

Quick Menus

Via the quick menus the user can quickly open application windows or create new documents.


A request is fired for each menu during the log-in process in order to create the Javascript datasource object:

    createClassName: '',
    ID: '99B9CC42FDEA4CA7A4EE35BC49D61E0E',
    potentiallyShared: true,
    dataURL: '/erp_pi_pgsql/org.openbravo.service.datasource/99B9CC42FDEA4CA7A4EE35BC49D61E0E',
    requestProperties: {
        params: {
            _skinVersion: 'Default',
            _create: 'true',
            Constants_FIELDSEPARATOR: '$',
            _contextUrl: '',
            Constants_IDENTIFIER: '_identifier'
    fields: [{
        name: 'icon',
        type: '_id_10'
    }, {
        name: '_identifier',
        type: '_id_10'
    }, {
        name: 'id',
        type: '_id_10'

Besides, the first time that the user clicks on these menus, a datasource call is fired (with the object mentioned above) in order to retrieve the list of elements that can be launched from each one. However, this very same information can be retrieved from the data obtained with the menu generation.

Therefore, by keeping this information cached in the client, we will avoid the following requests:

With this solution, we can also safely delete the java classes in charge of the datasource calls: and

Javascript Static Code

Some parts of code being generated during a log-in with freemarker templates (layout, menus, navigation bar components...) which do not need to be generated dynamically will be moved to static code. This will help to reduce the time spent in subsequent log-in operations because static code will be cached by the browser.

Merge Requests

In order to improve the scalability of the log-in process, one of the objectives is to reduce the number of request done during this process. Thus, there is a set of requests which will be merged into just one:

All of these requests are generating dynamic (session) data dependent of the user/role used to log-in. Since this project we will name the components used to generate this data as session dynamic resources. This kind of components will grouped and generated on each login by a new class called SessionDynamicResourceComponent.

Note: In order to avoid the Application request, the navigation bar elements are generated in a static way. In case a module adds a navigation bar element not generated in this new way (using the previous way), the Application request will be fired in order to ensure backwards compatibility.

Retrieved from ""

This page has been accessed 970 times. This page was last modified on 11 April 2017, at 15:00. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.