mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 13:45: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
|
|
@ -65,8 +65,9 @@ TODO
|
|||
pulls in *way too many* dependencies, and that lacks a C binding. We may
|
||||
put in the work of either forking off libolm or making a binding to KappaChat.
|
||||
|
||||
- Mess with Cytoplasm to make it have support for something like LMDB as an
|
||||
~ Mess with Cytoplasm to make it have support for something like LMDB as an
|
||||
*optional* dependency. This should increase reliability and speed for anyone.
|
||||
v Work is going on on the Cytoplasm `lmdbwerk` and this branch to get LMDB.
|
||||
- Nesting might be an issue we'll need to deal with. libdb and Berkley DB
|
||||
seem to lack support for them. If we can shove entries at specific indices,
|
||||
we _might_ just manage to get some system that can at least emulate that,
|
||||
|
|
|
|||
|
|
@ -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