Splits back content archive into two views, removes query round trips to improve load time.#4370
Merged
Merged
Conversation
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.
bd6ad4f to
da224ba
Compare
joemull
requested changes
Aug 30, 2024
joemull
left a comment
Member
There was a problem hiding this comment.
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:

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.
mauromsl
approved these changes
Sep 4, 2024
mauromsl
left a comment
Member
There was a problem hiding this comment.
added an optional comment but otherwise good to merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.