]> Sergey Matveev's repositories - public-inbox.git/commitdiff
thread: remove rootset accessor method
authorEric Wong <e@80x24.org>
Wed, 5 Oct 2016 23:47:22 +0000 (23:47 +0000)
committerEric Wong <e@80x24.org>
Wed, 5 Oct 2016 23:52:54 +0000 (23:52 +0000)
It doesn't buy us much and copying to a new array is slower;
but probably not measurable in real-world use.

lib/PublicInbox/SearchThread.pm
lib/PublicInbox/View.pm

index d39e9b62f19101c7afc329f0fe1afdfe3486f416..7e89946df81bd695ab7b14251cf2eae1ae346653 100644 (file)
@@ -29,8 +29,6 @@ sub new {
        }, $_[0];
 }
 
-sub rootset { @{$_[0]{rootset}} }
-
 sub thread {
        my $self = shift;
        $self->_setup();
index 748e39106a58d5a73450df89b7b26159044aad0b..7554d54f87fed1e5089721c1b88a46957c2c8f18 100644 (file)
@@ -259,7 +259,7 @@ sub _th_index_lite {
 
 sub walk_thread {
        my ($th, $ctx, $cb) = @_;
-       my @q = map { (0, $_) } $th->rootset;
+       my @q = map { (0, $_) } @{$th->{rootset}};
        while (@q) {
                my $level = shift @q;
                my $node = shift @q or next;
@@ -291,7 +291,7 @@ sub stream_thread ($$) {
        my ($th, $ctx) = @_;
        my $inbox = $ctx->{-inbox};
        my $mime;
-       my @q = map { (0, $_) } $th->rootset;
+       my @q = map { (0, $_) } @{$th->{rootset}};
        my $level;
        while (@q) {
                $level = shift @q;