1
I own a commercial application that is with an extremely time consuming login for the user. The connection to the Database to validate user and password, as well as the Spring Security startup take around 0.8 seconds, which is great.
The problem is the loading of the main page, which displays charts and tables and the connection to the Bank exceeds 20 seconds. The query is done at the Bean startup and only after the return, the displayed page changes. For the user, there is no feedback while this is done and it is the impression that the application has crashed.
Call from the Home Page method:
<f:metadata>
<f:viewAction action="#{paginaInicialBean.inicializar()}"/>
</f:metadata>
I’ve done tests with @PostConstruct
, javascript methods like window.onload
or with the word "Defer", but all exhibit the same behavior already offered by the JSF core schema (f:).
I thought about making a load in stages, as Gmail has, but I did not succeed in the implementation. Another option would be to display my template (Top Menu) and only then call the Main Page method, so the user knows something is being loaded and if he does not want to wait, he can leave by navigating the menu.
Has anyone ever had such difficulty?