Hi everyone,
I want to optimize my app load time. Whenever I open my app for the first time, it lost around 1.5-2 seconds. After first load, there is no lost time…
I’m using the latest version of the “shopify_app” gem and I use the new authentication strategy… Tried almost everything. What can be the real problem? Is there anyone facing similar issue?
Sorry could you clarify what you mean by lost time?
Do you have the network waterfall from your app load?
Are you using managed install or legacy install?
Hi @JordanFinners
I just wanted to edit my reply because it’s still happening…
Here is my logs;
2025-08-17T21:39:49.407944+00:00 app[web.1]: I, [2025-08-17T21:39:49.407887 #2] INFO -- : [cd97bbf5-7b4d-809b-24d4-969582eb07f0] Started GET "/?embedded=1&hmac=HMAC_HERE&host=HOST_HERE&id_token=[FILTERED]&link_source=search&locale=en&session=SESSION&shop=*****.myshopify.com×tamp=1755466788" for 172.69.9.77 at 2025-08-17 21:39:49 +0000
2025-08-17T21:39:49.408791+00:00 app[web.1]: I, [2025-08-17T21:39:49.408759 #2] INFO -- : [cd97bbf5-7b4d-809b-24d4-969582eb07f0] Processing by HomeController#index as HTML
2025-08-17T21:39:49.408832+00:00 app[web.1]: I, [2025-08-17T21:39:49.408814 #2] INFO -- : [cd97bbf5-7b4d-809b-24d4-969582eb07f0] Parameters: {"embedded"=>"1", "hmac"=>"HMAC_HERE", "host"=>"HOST_HERE", "id_token"=>"[FILTERED]", "link_source"=>"search", "locale"=>"en", "session"=>"SESSION_HERE", "shop"=>"*****.myshopify.com", "timestamp"=>"1755466788"}
2025-08-17T21:39:49.409095+00:00 app[web.1]: I, [2025-08-17T21:39:49.409072 #2] INFO -- : [cd97bbf5-7b4d-809b-24d4-969582eb07f0] 🔍 STEP 1: params[:shop] = *****.myshopify.com
2025-08-17T21:39:49.410138+00:00 app[web.1]: I, [2025-08-17T21:39:49.410106 #2] INFO -- : [cd97bbf5-7b4d-809b-24d4-969582eb07f0] 🔍 STEP 2: About to find shop
2025-08-17T21:39:50.773191+00:00 app[web.1]: Shop Load (68.9ms) SELECT "shops".* FROM "shops" WHERE "shops"."shopify_domain" = $1 LIMIT $2 [["shopify_domain", "*****.myshopify.com"], ["LIMIT", 1]]
2025-08-17T21:39:50.773485+00:00 app[web.1]: ↳ app/controllers/application_controller.rb:30:in `set_shop_origin'
2025-08-17T21:39:50.774712+00:00 app[web.1]: I, [2025-08-17T21:39:50.774663 #2] INFO -- : [cd97bbf5-7b4d-809b-24d4-969582eb07f0] 🔍 STEP 3: Shop found: #.....
I’m using the managed install…
I can’t see anything unusual on network waterfall.
It just waits around 1.5-2 seconds nowhere… I can’t detect why it’s waiting or what it is doing…
Not: This won’t happen on the development environment, only on the production…
Where is your database located in relation to where your app is located?
I suspect it is connecting/latecy to your database.