10 Commits

Author SHA1 Message Date
Rogier
aa4d16ec96 Fix name of a variable in db-sqlite3.*
m_BlockPosList -> m_blockPosList
2016-08-03 11:31:38 +02:00
Rogier
03926420d0 Implement bounded block-list query for postgresql
i.e. allow minetestmapper to query the database for a list of
blocks in a specific range (corresponding to the requested geometry),
instead of always obtaining a full list off all blocks.

As postgresql is the only database which supports this efficiently,
this option is only effective for postgresql.
2016-01-17 10:37:51 +01:00
Rogier
216bc32a35 Improve sqlite access speed by using rowid in query if possible
The speedup is measurable, but not stellar.
2015-03-10 12:01:55 +01:00
Rogier
7c2cf3efa9 Cleanup sqlite3 database code a bit
As tests using --sqlite-cacheworldrow showed a consistently
lower performance than without, this option was effectively
disabled. It is still recognised for compatibility, but
it may be removed some time in the future.
2015-03-10 12:01:55 +01:00
Rogier
49cb97598d Fix choice between c++11 unordered_map and c++0x regular (ordered) map 2014-05-22 10:41:47 +02:00
Rogier
c692d3d652 Improvements to database code & some small optimisations 2014-05-22 10:32:12 +02:00
Rogier
10e6a746cd Database performance tweaks
Added the option to bulk load and cache entire world rows at
a time when using sqlite. Caching is implemented in the
database class this time around.
Enabled using --sqlite-cacheworldrow on the command line.

This is essentially re-introduces the database access strategy
that was used originally, but as an option.

Currently, one block is read at a time from the database.
The original behavior was to read and cache one entire world
row at a time, irrespective of whether or not only a (small)
subsection of the world was being mapped.
Under some circumstances, in particular if the entire world is
mapped or a relatively large percentage of it (blocks-wise), the
bulk loading and caching may outperform the one-by-one strategy,
even though it usually loads many more blocks than are actually
needed.

It seems that leveldb won't benefit from any kind of caching or
bulk loading of blocks, so none was implemented.

Leveldb does compile now. Still not tested on a database :-(

Improved the database statistics (printed with --verbose).
2014-03-26 00:23:33 +01:00
Rogier
ecbe59ac82 Optimize database access - load only blocks that are needed 2014-03-24 22:43:32 +01:00
Rogier
c566d986cf Fix memory leak (and performance) re-preparing sqlite3 statement over and over - once is enough 2014-03-24 08:14:05 +01:00
Sfan5
393d7e2ac0 LevelDB support 2014-03-05 21:42:21 +01:00