yeasir_arafat's avatar

Slow loading page on Chrome

This is probably not a laravel specific problem, but mine is a laravel app so posting it here. Any hint/suggestion to the right direction will be very helpful.

In my app there is a page where user uploads a file and then the user is redirected to another url which returns a view that renders some summary data in relations to the uploaded file. It involves a lot of db queries, but my finding is DB layer is not the problem.

The issue is, on google chrome, the redirected page is loading extremely slowly whereas on Firefox the whole process(from upload to summary/review page) takes approx. 1-2 seconds. From laravel debugbar i can see the summary page took around 700ms, but chrome devtools says load time 2.1 minutes. However, if i load the summary page directly, chrome is quick as well. Here are some debug info around the time being spent at different stages:

[2021-10-01 04:08:53] local.INFO: finished uploading csv. time: 2021-10-01 04:08:53
  
[2021-10-01 04:08:54] local.INFO: start reviewing prices. time: 2021-10-01 04:08:54
  
[2021-10-01 04:08:54] local.INFO: finished loading relations. time: 2021-10-01 04:08:54
  
[2021-10-01 04:08:54] local.INFO: start loading new prices. time: 2021-10-01 04:08:54
  
[2021-10-01 04:08:54] local.INFO: finished loading new prices. time: 2021-10-01 04:08:54
  
[2021-10-01 04:08:54] local.INFO: start loading no price change. time: 2021-10-01 04:08:54
  
[2021-10-01 04:08:54] local.INFO: stop loading no price change. time: 2021-10-01 04:08:54
  
[2021-10-01 04:08:54] local.INFO: start loading valid stocks. time: 2021-10-01 04:08:54
  
[2021-10-01 04:08:54] local.INFO: stop loading valid stocks. time: 2021-10-01 04:08:54
  
[2021-10-01 04:08:54] local.INFO: start loading invalid stocks. time: 2021-10-01 04:08:54
  
[2021-10-01 04:08:54] local.INFO: stop loading invalid stocks. time: 2021-10-01 04:08:54
  
[2021-10-01 04:08:54] local.INFO: start loading unchanged stocks. time: 2021-10-01 04:08:54
  
[2021-10-01 04:08:54] local.INFO: stop loading unchanged stocks. time: 2021-10-01 04:08:54
  
[2021-10-01 04:08:55] local.INFO: stop building view data. time: 2021-10-01 04:08:55

This stat is same for both chrome and firefox. But from the point stop building view data above, until the summary page loads, chrome is slow.

Can anyone suggest where to look?

Thanks, Yeasir

0 likes
1 reply

Please or to participate in this conversation.