[Xapian-tickets] [Xapian] #325: flint_table.cc uses zlib inefficiently
Xapian
nobody at xapian.org
Wed Feb 4 08:15:11 GMT 2009
#325: flint_table.cc uses zlib inefficiently
---------------------------+------------------------------------------------
Reporter: tlipcon | Owner: olly
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Backend-Flint | Version:
Severity: normal | Resolution:
Keywords: | Blockedby:
Platform: All | Blocking:
---------------------------+------------------------------------------------
Comment(by richard):
I've done some profiling of this patch. On my system (ubuntu hardy, glibc
version 2.7-10ubuntu4, zlib version 1:1.2.3.3.dfsg-7ubuntu1), it makes
little difference, though testing under strace does reveal that it reduces
the number of brk() calls per document add from an average of about 3 to
1. The original poster mentioned on IRC that using tcmalloc instead of
the default alloc on his system (debian etch, but also tested with debian
lenny with similar results).
I think it's probably worth including this patch on trunk, though it needs
a little cleaning up: in particular, the destructor doesn't clean up the
lazily allocated structures, so I believe there's a memory leak with the
patch. The original poster also mentioned on IRC that the FlintTable
destructor isn't virtual, which it probably should be, but I've not had
time to look into this so far.
--
Ticket URL: <http://trac.xapian.org/ticket/325#comment:1>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list