lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (LUCENE-5703) Don't allocate/copy bytes all the time in binary DV producers
Date Thu, 05 Jun 2014 04:24:01 GMT


Robert Muir commented on LUCENE-5703:

Upon final review: I am unhappy about a few things with the latest patch, mostly doing with
* DocValues.EMPTY_XXX is now unsafe, it uses a static mutable thing (BytesRef). We should
make these methods instead of constants. This won't ever be performance critical so its ok
to me.
* Memory and so on should do an array copy instead of returning singleton stuff. If there
is a bug in someone's code, it could corrupt the data and get merged into index corruption.

I'm ok with someone's bug in their code corrupting their threadlocal code-private byte[],
but not the index. We have to draw the line there.

> Don't allocate/copy bytes all the time in binary DV producers
> -------------------------------------------------------------
>                 Key: LUCENE-5703
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>             Fix For: 4.9, 5.0
>         Attachments: LUCENE-5703.patch, LUCENE-5703.patch, LUCENE-5703.patch, LUCENE-5703.patch,
> Our binary doc values producers keep on creating new {{byte[]}} arrays and copying bytes
when a value is requested, which likely doesn't help performance. This has been done because
of the way fieldcache consumers used the API, but we should try to fix it in 5.0.

This message was sent by Atlassian JIRA

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

View raw message