Michael McCandless created LUCENE-10211:
-------------------------------------------

             Summary: Move IntBlockPool's slice allocator and 
SliceReader/Writer out to MemoryIndex
                 Key: LUCENE-10211
                 URL: https://issues.apache.org/jira/browse/LUCENE-10211
             Project: Lucene - Core
          Issue Type: Improvement
            Reporter: Michael McCandless


Spinoff from exciting issue LUCENE-9673.

Lucene's {{ByteBlockPool}} and {{IntBlockPool}} are sort of like a little 
malloc implementation, embedding many logical growing {{int[]}} into a series 
of block buffers.  This is needed to compactly/efficiently store postings data, 
since there can be many unique terms, each with their own growing {{byte[]}} 
holding postings.

{{IntBlockPool}} also has these slices, however, nowhere in {{core}} do we use 
those.  Rather, the allocation needs for {{int[]}} is simpler: just allocated a 
fixed length 1, 2 or 3 {{int[]}} per unique term.  We can greatly simplify 
{{IntBlockPool}}.

However, {{MemoryIndex}} does use these slices from {{IntBlockPool}}.  I think 
we should move the complex slice logic in {{IntBlockPool}} out to 
{{MemoryIndex}}, simplifying core?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to