You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2014/05/23 23:44:01 UTC

[jira] [Commented] (LUCENE-5703) Don't allocate/copy bytes all the time in binary DV producers

    [ https://issues.apache.org/jira/browse/LUCENE-5703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14007749#comment-14007749 ] 

Adrien Grand commented on LUCENE-5703:
--------------------------------------

On a side note, I think that the fact that the buffer needs to be supplied by the consumer {{void get(int docId, BytesRef result)}} is a bit error-prone since the {{BytesRef}} is created by the consumer while its content is owned by the {{BinaryDocValues}}. Maybe we should make {{BinaryDocValues}} responsible for managing the {{BytesRef}} entirely by changing the method signature to {{BytesRef get(int docId)}} similarly to {{BytesRef next()}} in {{TermsEnum}}?

> Don't allocate/copy bytes all the time in binary DV producers
> -------------------------------------------------------------
>
>                 Key: LUCENE-5703
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5703
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>             Fix For: 5.0
>
>
> 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
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org