Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace usage of interactions table on admin page #1339

Closed
misaugstad opened this issue Nov 14, 2018 · 8 comments
Closed

Replace usage of interactions table on admin page #1339

misaugstad opened this issue Nov 14, 2018 · 8 comments

Comments

@misaugstad
Copy link
Member

Although PR #1325 will improve the initial load time of the admin page significantly (to under 30 seconds), loading the analytics tab still takes several minutes, and it even fails due to the JVM running out of heap space. The reason is that we are trying to run queries on the audit_task_interaction table.

As discussed in a meeting today, this table should really only be used for data analysis purposes; we shouldn't be trying to access it on any part of the website (except to insert new interactions). So we need to put anything we truly want to access into separate tables that can be queried quickly, and remove any other accesses to this table that are not necessary so that we can view our admin dashboard in a timely manner :)

@misaugstad
Copy link
Member Author

I believe the only graphs that use the audit_task_interaction table are the onboarding completion time and total time spent auditing graphs (shown below):

onbaording-completion-time-graph

image

@jonfroehlich how important do you think each of these graphs are for the admin page? I see 2 reasonable options for dealing with these graphs:

  1. Just get rid of them. This is the easiest/fastest way to deal with this.
  2. Create new tables to store pre-computed values that we could pull from. We could then update these tables nightly. I don't think this would be too difficult... But it will take some effort to implement and test. So I want to ask if you are getting a real benefit out of seeing these graphs before I move ahead with it.

A third option could be figuring out a new way of computing "time spent" that is less precise, but doesn't require looking at interaction logs, and is thus much faster to compute. This would have the advantage of updating in real-time instead of nightly. But for these particular graphs, I don't think we need the most up to date data, so it isn't worth the time to implement.

@misaugstad
Copy link
Member Author

@jonfroehlich do you need those two graphs on the admin page?

@jonfroehlich
Copy link
Member

jonfroehlich commented Jan 22, 2019 via email

@misaugstad
Copy link
Member Author

No problem. I'll just remove them from the admin page for now then to speed up the page load. Shall I port that change over to the frozen DC code as well once I've written it?

@jonfroehlich
Copy link
Member

jonfroehlich commented Jan 22, 2019 via email

@misaugstad
Copy link
Member Author

Only if you plan on using the admin dashboard's analytics page on that server. So probably not necessary.

@jonfroehlich
Copy link
Member

jonfroehlich commented Jan 22, 2019 via email

@misaugstad
Copy link
Member Author

Closing via #1401

@ghost ghost removed the pull-request-submitted label Jan 22, 2019
@misaugstad misaugstad mentioned this issue Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants