Skip to content

Add a test asserting that adding entries doesn't cause N queries - #487

Draft
dfabulich wants to merge 1 commit into
iftechfoundation:mainfrom
dfabulich:n-queries-test
Draft

dfabulich wants to merge 1 commit into
iftechfoundation:mainfrom
dfabulich:n-queries-test

Conversation

@dfabulich

Copy link
Copy Markdown
Contributor

This test is failing. It opens the /ballot page and counts the number of SQL queries on the page, and then it adds 15 ballot entries and measures again.

The test asserts that we're not executing N SQL queries when adding N entries, but it's failing. The test shows that we're adding 90 SQL queries when adding 15 entries, 6 queries per entry.

Instead of doing that, I think we should configure DBIC to do proper joins, returning all of the necessary data up front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant