I’ve been working on an app for awhile now - runs like a dream locally, basically behaves exactly as I would expect it to. I deployed it to Galaxy recently and I’ve been seeing some serious performance issues in some weird spots. Namely, it seems like my subscriptions are taking way too long to be ready, they don’t actually fire off until you log in (even though they are in the startup.jsx file) and there is even a 5 second or so lag when you reload the page before the app will recognize that you are already logged in. Signing up for an account will generally take 15-20 seconds on the deployed version as well.
App is deployed at: www.nexgenfantasy.com
Code can be found at: www.github.com/tonymckendry/fantasyFootball
Strangley enough, when you first visit the site, the login page shows up immediately, as I would expect, and after the initial loading of the subscriptions everything is very fast and responsive as I would expect it to be. I have console logs on the client side currently so you can see in the browser console when the app recognizes that you are logged in, and when the subscriptions are ready.
My largest db collection has about 3000 objects in it (all the players in the NFL) - currently they’re all being published at once, but I have actually removed all but a handful of them (and scaled down all of my other collections) and did not see a decrease in these load times. I have a $15/month shared cluster database on mLab as recommended by Galaxy.
This image shows the Chrome timeline from the time I click log in (green rectangle on the left), until the app is ready (yellow on the right) - I noticed that there is very little activity happening during this time. If I view this same timeline locally, there is not a large empty gap like that.
I am truly at a loss right now - I work on a very similarly structured app for my job, which is far more complex in nature and we don’t see these issues.
Basically, I am wondering if I have coded something wrong, if I might need to scale up my Galaxy container (or add another) or if I am just totally overlooking something crucial that might be causing these issues.
I reached out to Galaxy support and they said my question was outside of their scope.