[Xapian-tickets] [Xapian] #325: flint_table.cc uses zlib inefficiently

Xapian nobody at xapian.org
Tue Mar 3 01:49:47 GMT 2009


#325: flint_table.cc uses zlib inefficiently
---------------------------+------------------------------------------------
 Reporter:  tlipcon        |        Owner:  richard  
     Type:  enhancement    |       Status:  reopened 
 Priority:  normal         |    Milestone:  1.1.0    
Component:  Backend-Flint  |      Version:  SVN trunk
 Severity:  normal         |   Resolution:           
 Keywords:                 |    Blockedby:           
 Platform:  All            |     Blocking:           
---------------------------+------------------------------------------------
Changes (by olly):

  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 Sorry, going to reopen this one, at least briefly.  Having had a look at
 the patch as applied:

  * You only updated chert, and not flint, for the last of your bullet
 points (which I've addressed in r12020).

  * Errors from inflateReset() and deflateReset() are ignored.  Not sure
 what the best response is.  We could just throw an error, but perhaps more
 robust would be to call inflateEnd() and then delete the zstream, then
 drop through to the allocating code?

  * If inflateInit2() or deflateInit2() fails, should we delete the
 structure?  The API docs for zlib don't go into detail on this, but
 particularly if the error was Z_MEM_ERROR it seems likely that the
 structure isn't fully set up and the docs for the reset methods say "does
 not free and reallocate all the internal compression state".

 Sorry for not noticing the latter two before.

 I might take a look at the zlib source later to see if that sheds light on
 these.  If not actually explicitly documented, the behaviour is perhaps
 subject to change, but if it shows we do need to do something on
 Z_MEM_ERROR, then it means we definitely do.

-- 
Ticket URL: <http://trac.xapian.org/ticket/325#comment:8>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list