-
Notifications
You must be signed in to change notification settings - Fork 14
perf: convert getchildren to querydescendants #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -122,16 +122,11 @@ end | |||||
| function ImOverlay:m_Pool() | ||||||
|
|
||||||
|
|
||||||
| for _, Obj in self.BackFrame:GetChildren() do | ||||||
| if Obj:IsA("UIListLayout") or not Obj.Visible then | ||||||
| continue | ||||||
| end | ||||||
|
|
||||||
| for _, Obj in self.BackFrame:QueryDescendants("> :not(UIListLayout, [Visible = false])") do | ||||||
|
||||||
| for _, Obj in self.BackFrame:QueryDescendants("> :not(UIListLayout, [Visible = false])") do | |
| for _, Obj in self.BackFrame:GetChildren() do |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The for loop has lost its indentation. It should be indented with a tab character to match the function's indentation level, similar to the other code in this function (see line 131 which correctly has indentation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The QueryDescendants selector is malformed and will not work as intended. The selector "> :not(UIListLayout, [Visible = false])" has multiple issues: (1) :not() cannot contain comma-separated selectors in QueryDescendants, (2) [Visible=false] attempts to filter by the Visible property, but QueryDescendants attribute selectors only work with actual Attributes, not instance properties. The Visible property must be checked in code. Since the filtering logic on lines 126-128 is still present and necessary, this change provides no benefit over the original GetChildren() approach and may actually cause unexpected behavior with the malformed selector.