mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:05:10 +00:00
[ADD/WIP] Test out LMDB
Separate branch because I'm mainly testing reliability. Seek out lda/Cytoplasm's lmdbwerk branch for the base upstream(with mem-moment's Memory.c impl to apply)
This commit is contained in:
parent
61b248363d
commit
2a09bd7156
3 changed files with 9 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ ParseeInitData(XMPPComponent *comp)
|
|||
data->router = HttpRouterCreate();
|
||||
data->jabber = comp;
|
||||
data->handler = CommandCreateRouter();
|
||||
data->db = DbOpen(data->config->db_path, 0);
|
||||
data->db = DbOpenLMDB(data->config->db_path, 64 MB);
|
||||
|
||||
#define X_ROUTE(path, func) do {\
|
||||
if (!HttpRouterAdd(data->router, path, func))\
|
||||
|
|
|
|||
|
|
@ -65,6 +65,12 @@ typedef struct ParseeData {
|
|||
#define MINUTES * 60 SECONDS
|
||||
#define HOURS * 60 MINUTES
|
||||
|
||||
/* Size units(using 2^10 as a reference), to be used like the time units */
|
||||
#define B * 1
|
||||
#define KB * 1024 B
|
||||
#define MB * 1024 KB
|
||||
#define GB * 1024 MB
|
||||
|
||||
/* Initialises a Parsee config from scratch, and writes to it
|
||||
* as JSON in the CWD. */
|
||||
extern void ParseeConfigInit(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue