Reduce overheads of PostList positional data support
commit11854f7ea4e1b4c8fc6f0004e5126d4ce2ee4717
authorOlly Betts <olly@survex.com>
Tue, 2 Jan 2018 00:16:46 +0000 (2 13:16 +1300)
committerOlly Betts <olly@survex.com>
Tue, 2 Jan 2018 00:16:46 +0000 (2 13:16 +1300)
tree2b4e674ec0d9217f611cc146877375760abb2f70
parent8f1d78307ecd71c375c476a16fe5ba7d0f797009
Reduce overheads of PostList positional data support

Probably the majority of PostList objects aren't involved in phrases
or OP_NEAR during the match, so avoid the overhead of a position
list object when we know we won't need it.  For glass, we lazily
create it (so only have the overhead of a pointer, while for honey
we use a special subclass to eliminate the size overhead completely).

We also now avoid copying interpolative coded positional data in
order to iterate it in most cases.
30 files changed:
xapian-core/api/leafpostlist.cc
xapian-core/api/leafpostlist.h
xapian-core/backends/databaseinternal.h
xapian-core/backends/empty_database.cc
xapian-core/backends/empty_database.h
xapian-core/backends/glass/glass_database.cc
xapian-core/backends/glass/glass_database.h
xapian-core/backends/glass/glass_dbcheck.cc
xapian-core/backends/glass/glass_positionlist.cc
xapian-core/backends/glass/glass_positionlist.h
xapian-core/backends/glass/glass_postlist.cc
xapian-core/backends/glass/glass_postlist.h
xapian-core/backends/honey/honey_database.cc
xapian-core/backends/honey/honey_database.h
xapian-core/backends/honey/honey_positionlist.cc
xapian-core/backends/honey/honey_positionlist.h
xapian-core/backends/honey/honey_postlist.cc
xapian-core/backends/honey/honey_postlist.h
xapian-core/backends/honey/honey_postlisttable.cc
xapian-core/backends/honey/honey_postlisttable.h
xapian-core/backends/inmemory/inmemory_database.cc
xapian-core/backends/inmemory/inmemory_database.h
xapian-core/backends/multi/multi_database.cc
xapian-core/backends/multi/multi_database.h
xapian-core/backends/remote/remote-database.cc
xapian-core/backends/remote/remote-database.h
xapian-core/common/bitstream.cc
xapian-core/common/bitstream.h
xapian-core/matcher/localsubmatch.cc
xapian-core/matcher/queryoptimiser.h