lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martijn van Groningen (JIRA)" <>
Subject [jira] [Commented] (LUCENE-7391) MemoryIndexReader.fields() performance regression
Date Mon, 25 Jul 2016 07:01:20 GMT


Martijn van Groningen commented on LUCENE-7391:

bq. +1 - freeze() was a hack, and I've been meaning to open an issue to make things properly
immutable for ages.

[~romseygeek] Then lets try to fix this in master :) I've opened LUCENE-7394 to track this.

> MemoryIndexReader.fields() performance regression
> -------------------------------------------------
>                 Key: LUCENE-7391
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Steve Mason
>            Assignee: David Smiley
>         Attachments: LUCENE-7391-test.patch, LUCENE-7391.patch, LUCENE-7391.patch
> While upgrading our codebase from Lucene 4 to Lucene 6 we found a significant performance
regression - a 5x slowdown
> On profiling the code, the method MemoryIndexReader.fields() shows up as one of the hottest
> Looking at the method, it just creates a copy of the inner {{fields}} Map before passing
it to {{MemoryFields}}. It does this so that it can filter out fields with {{numTokens <=
> The simplest "fix" would be to just remove the copying of the map completely, and pass
{{fields}} directly to {{MemoryFields}}.  It's simple and removes any slowdown caused by this
method.  It does potentially change behaviour though, but none of the unit tests seem to test
that behaviour so I wonder whether it's necessary (I looked at the original ticket LUCENE-7091
that introduced this code, I can't find much in way of an explanation). I'm going to attach
a patch to this effect anyway and we can take things from there

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message