* [PATCH 2/2] searchthread: delete children early while ordering
2022-06-22 8:02 5% [PATCH 0/2] searchthread: minor simplifications Eric Wong
@ 2022-06-22 8:02 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-06-22 8:02 UTC (permalink / raw)
To: meta
This allows us to free up some memory sooner rather than later
in case ordersub is expensive.
---
lib/PublicInbox/SearchThread.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/PublicInbox/SearchThread.pm b/lib/PublicInbox/SearchThread.pm
index cc8c90ce..00ae9fac 100644
--- a/lib/PublicInbox/SearchThread.pm
+++ b/lib/PublicInbox/SearchThread.pm
@@ -167,7 +167,7 @@ sub order_children {
while (defined($cur = shift @q)) {
# the {children} hashref here...
my @c = grep { !$seen{$_}++ && visible($_, $ibx) }
- values %{$cur->{children}};
+ values %{delete $cur->{children}};
$ordersub->(\@c) if scalar(@c) > 1;
$cur->{children} = \@c; # ...becomes an arrayref
push @q, @c;
^ permalink raw reply related [relevance 7%]
* [PATCH 0/2] searchthread: minor simplifications
@ 2022-06-22 8:02 5% Eric Wong
2022-06-22 8:02 7% ` [PATCH 2/2] searchthread: delete children early while ordering Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2022-06-22 8:02 UTC (permalink / raw)
To: meta
A few patches I've had floating around since last Nov before
I completely forgot about some things :x
Eric Wong (2):
searchthread: remove + inline single-use cast sub
searchthread: delete children early while ordering
lib/PublicInbox/SearchThread.pm | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-06-22 8:02 5% [PATCH 0/2] searchthread: minor simplifications Eric Wong
2022-06-22 8:02 7% ` [PATCH 2/2] searchthread: delete children early while ordering Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).