gnucash future: Revert "[qofid.cpp] for Split and Trans reserve QofInstance* map"

Christopher Lam clam at code.gnucash.org
Thu Jun 25 19:27:31 EDT 2026


Updated	 via  https://github.com/Gnucash/gnucash/commit/e5142dfd (commit)
	from  https://github.com/Gnucash/gnucash/commit/994b04a1 (commit)



commit e5142dfd970ee831a66504a4e252651c019c4aea
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Jun 26 07:26:24 2026 +0800

    Revert "[qofid.cpp] for Split and Trans reserve QofInstance* map"
    
    This reverts commit 00803ba018527f30ea3239fd60a8675009a878ef.

diff --git a/libgnucash/engine/qofid.cpp b/libgnucash/engine/qofid.cpp
index 62d4ec46b0..cde7fd524e 100644
--- a/libgnucash/engine/qofid.cpp
+++ b/libgnucash/engine/qofid.cpp
@@ -47,14 +47,7 @@ struct QofCollection_s
 
     QofCollection_s (QofIdType type) : e_type{static_cast<QofIdType>(CACHE_INSERT(type))}
                                      , is_dirty{FALSE}
-                                     , data{NULL}
-    {
-        if (!g_strcmp0 (e_type, "Split"))
-            guid_entity_map.reserve (50000);
-        else if (!g_strcmp0 (e_type, "Trans"))
-            guid_entity_map.reserve (10000);
-    }
-
+                                     , data{NULL} {}
     ~QofCollection_s ()
     {
         CACHE_REMOVE (e_type);



Summary of changes:
 libgnucash/engine/qofid.cpp | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)



More information about the gnucash-changes mailing list