[3.0] Improve performance of XmlArraty#9187
Open
live627 wants to merge 14 commits intoSimpleMachines:release-3.0from
Open
[3.0] Improve performance of XmlArraty#9187live627 wants to merge 14 commits intoSimpleMachines:release-3.0from
live627 wants to merge 14 commits intoSimpleMachines:release-3.0from
Conversation
Sesquipedalian
requested changes
Apr 19, 2026
Comment on lines
+572
to
+584
| $indentation = $indent !== null ? ' | ||
| ' . str_repeat(' ', $indent) : ''; | ||
| static $indentation_cache; | ||
|
|
||
| $indentation_cache ??= $indent !== null | ||
| ? "\n" . str_repeat("\t", $indent) | ||
| : ''; | ||
| $indentation = $indentation_cache; |
Member
There was a problem hiding this comment.
I don't think this works. $indentation is supposed to be set to a number of tabs equal to the value of $indent, but this change will set $indentation only on the first call to the method and then ignore $indent in any subsequent calls.
Contributor
Author
There was a problem hiding this comment.
oh you''re right. I'll revert this one; static cache here probably not worth the effort.
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.
One of the main things slowing down the package lists is our XML parser. I have identified several repeated operations and have fixed them to not repeat as much.
The final commit needs a little more testing because I couldn’t test installing a mod due to my built cURL extension not working right.