AVLs: made maximum number of nodes per AVL 5 millions, as this combined

with keeping all AVLs mapped seems the most efficient. Now 1 million
sequences more or less constantly takes 1 minute.
This commit is contained in:
Celine Mercier
2018-11-19 11:22:26 +01:00
parent 7fc1b578cf
commit e9c1d5e48d

View File

@ -32,13 +32,12 @@
#define MAX_NB_OF_AVLS_IN_GROUP (1000) /**< The maximum number of AVL trees in a group. // TODO discuss #define MAX_NB_OF_AVLS_IN_GROUP (1000) /**< The maximum number of AVL trees in a group. // TODO discuss
*/ */
#define MAX_NODE_COUNT_PER_AVL (10000000) /**< The maximum number of nodes in an AVL tree. #define MAX_NODE_COUNT_PER_AVL (5000000) /**< The maximum number of nodes in an AVL tree.
* Only used to decide when to create a new AVL in a group, and to initialize the bloom filter // TODO discuss. Try 30M? * Only used to decide when to create a new AVL in a group, and to initialize the bloom filter // TODO discuss. Try 30M?
*/ */
#define MAX_DATA_SIZE_PER_AVL (1073741824) /**< The maximum size of the data referred to by an AVL tree in a group. #define MAX_DATA_SIZE_PER_AVL (1073741824) /**< The maximum size of the data referred to by an AVL tree in a group.
* Only used to decide when to create a new AVL in a group. * Only used to decide when to create a new AVL in a group.
* Should not be greater than int32_t max (2,147,483,647), as indexes will have to be stored on 32 bits. * Should not be greater than int32_t max (2,147,483,647), as indexes will have to be stored on 32 bits.
* Here 1073741824 B = 1 GB
*/ */
#define AVL_MAX_DEPTH (1024) /**< The maximum depth of an AVL tree. Used to save paths through the tree. #define AVL_MAX_DEPTH (1024) /**< The maximum depth of an AVL tree. Used to save paths through the tree.
*/ */
@ -378,6 +377,7 @@ OBIDMS_avl_group_p obi_clone_avl_group(OBIDMS_avl_group_p avl_group, const char*
* @brief Closes an AVL tree. * @brief Closes an AVL tree.
* *
* @param avl A pointer to the AVL tree structure to close and free. * @param avl A pointer to the AVL tree structure to close and free.
* @param writable Whether the AVL is writable or not (and therefore if the files can and should be truncated to the used size).
* *
* @retval 0 if the operation was successfully completed. * @retval 0 if the operation was successfully completed.
* @retval -1 if an error occurred. * @retval -1 if an error occurred.
@ -385,7 +385,7 @@ OBIDMS_avl_group_p obi_clone_avl_group(OBIDMS_avl_group_p avl_group, const char*
* @since December 2015 * @since December 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org) * @author Celine Mercier (celine.mercier@metabarcoding.org)
*/ */
int obi_close_avl(OBIDMS_avl_p avl); int obi_close_avl(OBIDMS_avl_p avl, bool writable);
/** /**