Skip Menu |

This queue is for tickets about the Plucene CPAN distribution.

Report information
The Basics
Id: 12715
Status: resolved
Priority: 0/
Queue: Plucene

People
Owner: Nobody in particular
Requestors: murray [...] minty.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: 1.23



Subject: Index::SegmentReader replace multiple getc calls with single read()
posting patch to rt so it's not lost http://www.kasei.com/pipermail/plucene/2005-May/000405.html small searches improve ~60%, large result sets still improve ~2%
diff -pburNB -x blib -x _build -x Build Plucene-1.21.orig/lib/Plucene/Index/SegmentReader.pm Plucene-1.21/lib/Plucene/Index/SegmentReader.pm --- Plucene-1.21.orig/lib/Plucene/Index/SegmentReader.pm 2005-01-24 10:52:07.000000000 +0000 +++ Plucene-1.21/lib/Plucene/Index/SegmentReader.pm 2005-04-28 12:26:08.000000000 +0100 @@ -270,6 +270,6 @@ sub _norm_read_from_stream { my ($self, $field) = @_; my $ns = $self->norm_stream($field) or return; my $output = ""; - $output .= chr($ns->read_byte()) for 1 .. $self->max_doc; + $ns->read($output, $self->max_doc); $output; }