Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Full-tree rendering issued one SiteContent lookup per node to rebuild its alias path. Prime the alias listing from the tree query when URLs are resolved lazily (aliaslistingfolder / full_aliaslisting), and normalise tree rows with a cast whitelist instead of Eloquent toArray() so plugin payloads keep the same types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Opened upstream instead: evolution-cms#2476 |
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.
Summary
Rendering a fully expanded resource tree called
makeUrl()once per node. Withaliaslistingfolderorfull_aliaslisting = 1, that meant oneSiteContentquery per node just to rebuild alias paths: about 10k queries for a 10k-resource site.UrlProcessor::primeAliasListings()fills the alias listing from rows the tree query already selects.getAliasListing()now builds the path of a primed entry on first use, and loads a parent that wasn't primed with one query, then reuses it.UrlProcessor::usesLazyAliasListing()is true.makeUrl()uses the same check. In the default mode the tree takes its aliases from the site cache, exactly as before.toArray()and go throughnormalizeTreeNodeRow(), a fixed list of int/bool casts that matchesSiteContent::$casts. Null values and strings are left alone, soOnManagerNodePrerender/OnManagerNodeRenderpayloads keep their types.Results (10,000 resources, 100 categories, full tree expanded)
Tests
core/tests/Unit/UrlProcessorAliasListingTest.phphas 6 tests:ApacheConfigHardeningTest, which needs a git checkout and failed only because the suite ran in a non-git copy.🤖 Generated with Claude Code