e-mission / op-admin-dashboard

An admin/deployer dashboard for the NREL OpenPATH platform
0 stars 8 forks source link

Initial loading is still slow despite including data for trips-table from the last 7 days only #100

Open achasmita opened 6 months ago

achasmita commented 6 months ago

Here are the possible solutions:

achasmita commented 6 months ago

@shankari any suggestion?

shankari commented 6 months ago

Can you also discuss this with @JGreenlee and come up with a solution jointly?

JGreenlee commented 6 months ago

Since I was testing the trip time page, which is outdated and doesn't have the 1 week filter, it was of course slow. I've yet to try the staging dataset on a more up-to-date branch. Let me try doing that and see if I can get a better understanding of the slowness

JGreenlee commented 6 months ago
  • It is not just loading the data table that is slow. Even just logging in to the dashboard with the summary page is slow.

This isn't what I observed on master with staging data. The "Overview" page consistently loads in about 3 seconds for me. The dump that I am using has about 40 users and 3000 trips. Might that not be enough to notice the slowness?

The "Data" page takes 20 seconds to load.

JGreenlee commented 6 months ago

I've just realized that was with "Exclude test users" enabled.

Without test users excluded, there are about twice as many users and trips. The "Data" page takes about twice as long to load. The "Overview" page still takes about 3 seconds.

shankari commented 6 months ago

@JGreenlee and @achasmita you should retry on the staging server. I just retried and it took ~ 45 seconds to load the overview page. Note that in staging/production, we don't use a DB that runs on the same host as the code, and DB accesses are significantly slower.

@JGreenlee you should have access to the staging logs through AWS cloudwatch. @achasmita should have a staging login. We can also add a cognito login for Jack on staging, please let me know if you need help for this.