This commit enable to
- have all the properties of a node grouped together so it is possible
to list all properties of a node without lineary lookup through all
the keys until the find one is found. A node's property key has the
following syntax:
p<node prefix 32 bits hash><node prefix><property name>
So listing all propertes of a node consist to do a MDB_SET_RANGE on
"p<node prefix 32 bits hash><node prefix> then checking the first 5
bytes are equal to "v<node prefix 32bits" instead of doing a string
compare to the whole prefix, and linerary lookup the next LMDB value
(as key of properties are then groupped together).
- Similarly, the name of all direct sub-nodes of a node N1 are "indexed"
by having the following key,values as the following syntax:
i<N1 prefix hash><sub-node prefix>,<sub-node name>
So listing all sub-nodes of a node is as simple as listing all
properties of a node, only needs a 5 bytes comparaison (instead of
whole string compare of the prefix) for each entry and avoid lineray
LMDB lookups to find the next sub-node.