PengZheng commented on code in PR #470: URL: https://github.com/apache/celix/pull/470#discussion_r1383337330
########## libs/utils/src/properties.c: ########## @@ -17,55 +17,87 @@ * under the License. */ +#include "properties.h" +#include "celix_properties.h" +#include "celix_properties_private.h" + +#include <assert.h> +#include <errno.h> +#include <math.h> +#include <stdbool.h> #include <stdio.h> -#include <string.h> #include <stdlib.h> -#include <ctype.h> -#include <stdbool.h> +#include <string.h> -#include "properties.h" #include "celix_build_assert.h" -#include "celix_properties.h" +#include "celix_err.h" +#include "celix_string_hash_map.h" #include "celix_utils.h" -#include "utils.h" -#include "hash_map_private.h" -#include <errno.h> -#include "hash_map.h" +#include "celix_stdlib_cleanup.h" +#include "celix_convert_utils.h" -#define MALLOC_BLOCK_SIZE 5 +#define CELIX_SHORT_PROPERTIES_OPTIMIZATION_STRING_BUFFER_SIZE 512 Review Comment: Short properties optimization is a good idea. I am not sure whether the size should be set according to max values. If this is enough for 80% usages, then I consider it a good choice. Given that celix_properties are used extensively and for various purposes other than service metadata, 128/256 may seem less scary. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org