lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Heiden (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-5959) Optimized memory management in Automaton.Builder.finish()
Date Wed, 17 Sep 2014 16:48:34 GMT

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

Markus Heiden commented on LUCENE-5959:
---------------------------------------

To avoid the initial creation of the transitions array, I could set it to "new int[0]" by
using a static constant for that. I don't know, if that affects the performance of other use
cases?

> Optimized memory management in Automaton.Builder.finish()
> ---------------------------------------------------------
>
>                 Key: LUCENE-5959
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5959
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/other
>    Affects Versions: 4.10
>            Reporter: Markus Heiden
>            Priority: Minor
>              Labels: patch
>         Attachments: finish.patch
>
>
> Reworked Automaton.Builder.finish() to not allocate memory stepwise. Added growTransitions(int
numTransitions) to be able to resize the transistions array just once.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message