diff options
author | Markus Olsson <j.markus.olsson@gmail.com> | 2016-03-18 20:02:37 +0100 |
---|---|---|
committer | Markus Olsson <j.markus.olsson@gmail.com> | 2016-03-18 20:02:37 +0100 |
commit | 30fcbb2a159d87b14c2e8518063ee2e1d5410af6 (patch) | |
tree | 43dd3bbf40f472eebd73f538e57891f256d5df64 | |
parent | ec5a43b60ab0dfcb42db8101edfca34be3d62947 (diff) | |
download | libgit2-niik/disable-tree-entry-pool-on-win32.tar.gz |
Temporarily disable tree entry pool on Windowsniik/disable-tree-entry-pool-on-win32
Recent tests and benchmarks have shown that this can have an dramatic
adverse effect on memory consumption and fragmentation in high
concurrency scenarios. malloc on Windows already has built in support
for managing multiple small allocations and the Low-fragmentation Heap
is possibly helping here as well but being subverted by the pool.
-rw-r--r-- | src/tree.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tree.c b/src/tree.c index 48b9f121d..5342cbca2 100644 --- a/src/tree.c +++ b/src/tree.c @@ -466,7 +466,11 @@ int git_tree__parse(void *_tree, git_odb_object *odb_obj) filename_len = nul - buffer; /** Allocate the entry and store it in the entries vector */ { +#ifdef GIT_WIN32 + entry = alloc_entry(buffer); +#else entry = alloc_entry_pooled(&tree->pool, buffer, filename_len); +#endif GITERR_CHECK_ALLOC(entry); if (git_vector_insert(&tree->entries, entry) < 0) |