Loading issue

  

Hi,

  I am facing the issue while loading the page . When i click the sub-menu (first time ) on my app it will take 10 second to load but when i click the same sub-menu second time it will load within a 1-2 second, i need to load my screen within a  second even for first click . so how can i solve this can anybody help me..


Thanks,

Darsh

Solution

Hi Darsh,

The difference between the first click and the others is, almost for sure, due the browser having the resources/data it's looking for in cache now.

This means that after the first time you click, images and so on are already in the client machine, not being necessary to download it again, reducing the time to render the page. Also, if you are caching aggregate and sql, you may be receiving data from server cache, without having to execute them again.

The only way to speed up the rendering in the first access to the page is to reduce the amount of data you are asking from the server, like images size and so on.

Depending on the cause of the slowness, techniques like laze load (for data) can help improve user experience, if there's no possibility of reducing the size of the request answer.

Cheers

Eduardo Jauch


Solution

Darsh, could you please clear your cache and take a load-time profile of the first request and then the second request using the developer tools of your browser and then post screenshots? Might help to diagnose - 10 seconds seems like a very long time for a page to load. 

Are you performing complex logic in the preparation of the page you are requesting? Is it happening for all pages or just one?