Skip to content

Splits back content archive into two views, removes query round trips to improve load time.#4370

Merged
mauromsl merged 9 commits into
masterfrom
b-4362_archive_page_query
Sep 4, 2024
Merged

Splits back content archive into two views, removes query round trips to improve load time.#4370
mauromsl merged 9 commits into
masterfrom
b-4362_archive_page_query

Conversation

@ajrbyers

@ajrbyers ajrbyers commented Aug 20, 2024

Copy link
Copy Markdown
Member

This PR:

This PR introduces a custom Aggregate function, GroupConcat, to concatenate query results into a single string with support for PostgreSQL, MySQL/MariaDB, SQLite, and MSSQL

This PR splits the archive page into two views. One for published articles and one for archived articles.

Additionally the use of subqueries massively reduces the number of database round trips and speeds the page up exponentially for installs with large numbers of published or archived articles.

This new function allows us to support the main db backends which each use a different underlying functions. Tested with MySQL, PSQL and SQLite.
Archived articles now use subqueries to avoid multiple round trips for identifiers and frozen author names.
@ajrbyers ajrbyers force-pushed the b-4362_archive_page_query branch from bd6ad4f to da224ba Compare August 20, 2024 13:49

@joemull joemull left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be working great technically, once I rebased it on master (14ec665).

Just needs some touch-ups to the copy:

The big heading "Article Archive" needs to be different on the two pages:
image

image

Just as an observation: it seems we are creating a lot of pages that have redundant headings with the big text and the small caps text. I think this comes from there being too many levels to the theme options for headings, and not a whole lot of consistency in how we use them. Something to clean up in the design system for sure.

@joemull joemull assigned ajrbyers and unassigned joemull Aug 30, 2024
@ajrbyers ajrbyers requested a review from mauromsl September 4, 2024 14:00
@ajrbyers ajrbyers assigned mauromsl and unassigned ajrbyers Sep 4, 2024

@mauromsl mauromsl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added an optional comment but otherwise good to merge

Comment thread src/submission/models.py Outdated
Comment thread src/utils/db_functions.py
@mauromsl mauromsl assigned ajrbyers and unassigned ajrbyers and mauromsl Sep 4, 2024
@mauromsl mauromsl merged commit b7f717c into master Sep 4, 2024
@mauromsl mauromsl deleted the b-4362_archive_page_query branch September 4, 2024 16:08
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.

Journal article archive page loads slowly Author display at rejected & archived articles

3 participants