gnucash/libgnucash/engine
Christian Stimming 92ea3ba8a6 Register speed-up for large files.
The function qof_book_use_split_action_for_num_field gets called quite a
lot in each register display refresh (due to sorting all splits from
Split.x's xaccSplitOrder function), but it always used to use a KVP
lookup, which is rather expensive compared to accessing a gboolean member
variable.

To get rid of this cost, I had to remove the KVP lookup in this
simple-looking function. The pattern is this: A gboolean cache variable is
introduced, along with an isvalid flag. The lookup makes the expensive
KVP lookup once, then caches the value. The GObject property mechanism
offers a callback for when the setter was called, which is used to mark
the cached value as invalid. A parallel setter method (here:
qof_book_set_option) also just marks the cache as invalid. This covers
all setters, and the getters will use the cached value except for their
first invocation.

The NUM_FIELD_SOURCE feature was introduced in 2012 by the very large
commit 7cdd7372 and apparently its costs never were a problem
until the KVP lookup became more costly due to the std::vector
construction and destruction.
2018-06-22 22:54:33 +02:00
..
test [test-extras] upgrade env-transfer-foreign to update pricedb 2018-06-16 14:18:30 +08:00
test-core Lowercase cmake commands 2018-05-03 23:18:15 +02:00
Account.cpp Merge Bill Nottingham's exception type fix into unstable. 2018-04-09 15:12:56 -07:00
Account.h Fix Imap Editor to reflect the changes in kvp paths 2018-03-29 17:32:57 +01:00
AccountP.h Account.c to Account.cpp 2017-12-21 07:39:32 -05:00
business-core.i Merge branch 'maint' 2017-09-10 19:16:38 +02:00
business-core.scm Restructure the src directory 2017-08-10 18:45:00 +02:00
cap-gains.c Transaction members Timespec->time64 2018-01-08 13:01:29 +11:00
cap-gains.h Restructure the src directory 2017-08-10 18:45:00 +02:00
cashobjects.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
cashobjects.h Restructure the src directory 2017-08-10 18:45:00 +02:00
CMakeLists.txt Lowercase cmake commands 2018-05-03 23:18:15 +02:00
commodity-table.scm Restructure the src directory 2017-08-10 18:45:00 +02:00
design.txt Restructure the src directory 2017-08-10 18:45:00 +02:00
engine-common.i Restructure the src directory 2017-08-10 18:45:00 +02:00
engine-helpers-guile.h Changing scheme conversion to gdate to use time64 2018-01-08 13:01:29 +11:00
engine-helpers.c Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
engine-helpers.h Restructure the src directory 2017-08-10 18:45:00 +02:00
engine-interface.scm TP->T64: libgnucash/engine/engine-interface.scm 2018-01-08 22:56:49 +11:00
engine-utilities.scm Restructure the src directory 2017-08-10 18:45:00 +02:00
engine.i Merge branch 'maint' into unstable 2018-01-25 10:24:53 +01:00
engine.scm Replace the gnc:numeric pair with normal Scheme rationals. 2017-12-21 15:33:15 -08:00
extensions.txt Restructure the src directory 2017-08-10 18:45:00 +02:00
FreqSpec.h Restructure the src directory 2017-08-10 18:45:00 +02:00
glib-helpers.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
glib-helpers.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-aqbanking-templates.cpp Kvp no longer parses entries looking for delimiters 2017-12-21 07:39:32 -05:00
gnc-aqbanking-templates.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-backend-prov.hpp Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-budget.c Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
gnc-budget.h timespec->time64 for gnc_budget_get_period... 2018-01-08 13:01:29 +11:00
gnc-commodity.c Merge branch 'maint' into unstable 2018-03-15 18:12:03 +01:00
gnc-commodity.h Merge branch 'maint' into unstable 2018-01-25 10:24:53 +01:00
gnc-date-p.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-date.cpp In qof_scan_date returns valid date when day and month are 0 2018-06-09 15:04:27 +01:00
gnc-date.h Some time64 corrections 2018-01-08 13:01:29 +11:00
gnc-datetime.cpp normalize date formats the C++ way. 2018-05-28 08:56:01 -07:00
gnc-datetime.hpp Optimize GncDateTime string constructor. 2018-02-24 11:12:13 -08:00
gnc-engine.c Don't look for backend libraries in old autotools subdirs. 2018-06-07 17:38:04 -07:00
gnc-engine.h Account.c to Account.cpp 2017-12-21 07:39:32 -05:00
gnc-event.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
gnc-event.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-features.c Bug 791848 - GC 2.6.x does not handle ISO dates introduced with GC 2.7. 2017-12-26 15:18:43 -08:00
gnc-features.h Bug 791848 - GC 2.6.x does not handle ISO dates introduced with GC 2.7. 2017-12-26 15:18:43 -08:00
gnc-hooks-scm.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-hooks.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
gnc-hooks.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-int128.cpp Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
gnc-int128.hpp Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-lot-p.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-lot.c Rename qofinstance function 2017-12-21 07:39:33 -05:00
gnc-lot.h Account.c to Account.cpp 2017-12-21 07:39:32 -05:00
gnc-numeric.cpp Gcc-4.8 doesn't have std::codecvt. 2018-03-09 16:28:00 -08:00
gnc-numeric.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-numeric.hpp Gcc-4.8 doesn't have std::codecvt. 2018-03-09 16:28:00 -08:00
gnc-numeric.scm Replace the gnc:numeric pair with normal Scheme rationals. 2017-12-21 15:33:15 -08:00
gnc-pricedb-p.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-pricedb.c Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
gnc-pricedb.h Change gnc_pricedb_convert_balance_nearest_price from timespec to time64. 2018-01-20 16:40:45 -08:00
gnc-rational-rounding.hpp Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-rational.cpp Adjust catch syntax to avoid GCC8 warnings. 2018-04-03 22:02:44 -04:00
gnc-rational.hpp Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-session.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
gnc-session.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-timezone.cpp Bug 795405 - All Dates in Price Database Off-By-One After 3.0 Upgrade 2018-04-27 15:00:28 -07:00
gnc-timezone.hpp Add a TimeZoneProvider::dump(). 2018-04-27 14:16:49 -07:00
gnc-uri-utils.c Restructure the src directory 2017-08-10 18:45:00 +02:00
gnc-uri-utils.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncAddress.c Restructure the src directory 2017-08-10 18:45:00 +02:00
gncAddress.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncAddressP.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncBillTerm.c Adding bill term time64 function 2018-01-08 13:01:29 +11:00
gncBillTerm.h Adding bill term time64 function 2018-01-08 13:01:29 +11:00
gncBillTermP.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncBusGuile.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
gncBusGuile.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncBusiness.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
gncBusiness.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncCustomer.c Rename qofinstance function 2017-12-21 07:39:33 -05:00
gncCustomer.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncCustomerP.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncEmployee.c Rename qofinstance function 2017-12-21 07:39:33 -05:00
gncEmployee.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncEmployeeP.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncEntry.c A more detailed revision of gncEntry and gncInvoice related rounding 2018-05-24 18:53:15 +02:00
gncEntry.h A more detailed revision of gncEntry and gncInvoice related rounding 2018-05-24 18:53:15 +02:00
gncEntryP.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncIDSearch.c Restructure the src directory 2017-08-10 18:45:00 +02:00
gncIDSearch.h Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
gncInvoice.c A more detailed revision of gncEntry and gncInvoice related rounding 2018-05-24 18:53:15 +02:00
gncInvoice.h A more detailed revision of gncEntry and gncInvoice related rounding 2018-05-24 18:53:15 +02:00
gncInvoiceP.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncJob.c Rename qofinstance function 2017-12-21 07:39:33 -05:00
gncJob.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncJobP.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncmod-engine.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
gncOrder.c Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
gncOrder.h Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
gncOrderP.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncOwner.c Transaction members Timespec->time64 2018-01-08 13:01:29 +11:00
gncOwner.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncOwnerP.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncTaxTable.c A more detailed revision of gncEntry and gncInvoice related rounding 2018-05-24 18:53:15 +02:00
gncTaxTable.h Merge branch 'maint' 2017-09-10 19:16:38 +02:00
gncTaxTableP.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncVendor.c Fix permanent storage of vendor details. 2018-05-25 01:56:14 +02:00
gncVendor.h Restructure the src directory 2017-08-10 18:45:00 +02:00
gncVendorP.h Restructure the src directory 2017-08-10 18:45:00 +02:00
guid.cpp Speed up GUID equality comparison. 2018-03-06 09:48:38 -08:00
guid.h Restructure the src directory 2017-08-10 18:45:00 +02:00
guid.hpp Speed up GUID equality comparison. 2018-03-06 09:48:38 -08:00
iso-4217-currencies.xml Merge branch 'maint' 2017-09-15 21:51:50 +02:00
iso-currencies-to-c.xsl Restructure the src directory 2017-08-10 18:45:00 +02:00
kvp_doc.txt Restructure the src directory 2017-08-10 18:45:00 +02:00
kvp-frame.cpp Bug 787095 - Gnucash Crashes when opening old XML file 2018-02-22 15:59:12 -08:00
kvp-frame.hpp Code review responses 2017-12-21 07:39:33 -05:00
kvp-scm.cpp Fix use of guile function introduced in 2.0.10, not available in Ubuntu14.04. 2017-12-22 11:25:19 -08:00
kvp-scm.h Restructure the src directory 2017-08-10 18:45:00 +02:00
kvp-value.cpp Correct kvp to_string typo 2017-12-21 07:39:33 -05:00
kvp-value.hpp Change kvp string representation 2017-12-21 07:39:32 -05:00
policy-p.h Restructure the src directory 2017-08-10 18:45:00 +02:00
policy.c Transaction members Timespec->time64 2018-01-08 13:01:29 +11:00
policy.h Account.c to Account.cpp 2017-12-21 07:39:32 -05:00
qof-backend.cpp Remove support code to load qof backend in autotools based build environment 2018-01-26 18:26:06 +01:00
qof-backend.hpp kvp frame to template and correcting failure macro 2017-12-21 07:39:32 -05:00
qof-gobject.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qof-string-cache.cpp Correct string cache code 2017-12-21 07:39:33 -05:00
qof-string-cache.h Correct string cache code 2017-12-21 07:39:33 -05:00
qof-win32.cpp Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
qof.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofbackend.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofbook-p.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofbook.cpp Register speed-up for large files. 2018-06-22 22:54:33 +02:00
qofbook.h Register speed-up for large files. 2018-06-22 22:54:33 +02:00
qofbookslots.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofchoice.cpp Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
qofchoice.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofclass-p.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofclass.cpp Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
qofclass.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofevent-p.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofevent.cpp Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
qofevent.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofid-p.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofid.cpp Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
qofid.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofinstance-p.h Fix Imap Editor to reflect the changes in kvp paths 2018-03-29 17:32:57 +01:00
qofinstance.cpp Fix Imap Editor to reflect the changes in kvp paths 2018-03-29 17:32:57 +01:00
qofinstance.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qoflog.cpp Bug 795134 - Improper handle of unicode character in username 2018-04-22 13:55:36 -07:00
qoflog.h Merge branch 'maint' into unstable 2018-02-19 15:25:53 +01:00
qofobject-p.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofobject.cpp Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
qofobject.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofquery-p.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofquery.cpp Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
qofquery.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofquerycore-p.h Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
qofquerycore.cpp Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
qofquerycore.h Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
qofsession.cpp Enforce -Werror on C++ files and fix resulting errors. 2017-12-26 15:18:43 -08:00
qofsession.h Restructure the src directory 2017-08-10 18:45:00 +02:00
qofsession.hpp Restructure the src directory 2017-08-10 18:45:00 +02:00
qofutil.cpp Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
qofutil.h Restructure the src directory 2017-08-10 18:45:00 +02:00
Query.c Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
Query.h Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
README Restructure the src directory 2017-08-10 18:45:00 +02:00
README.query-api Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
Recurrence.c Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
Recurrence.h Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
SchedXaction.c Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
SchedXaction.h Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
Scrub2.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
Scrub2.h Restructure the src directory 2017-08-10 18:45:00 +02:00
Scrub3.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
Scrub3.h Restructure the src directory 2017-08-10 18:45:00 +02:00
Scrub.c Transaction members Timespec->time64 2018-01-08 13:01:29 +11:00
Scrub.h Restructure the src directory 2017-08-10 18:45:00 +02:00
ScrubBusiness.c Merge branch 'maint' into unstable 2017-11-09 13:45:45 -08:00
ScrubBusiness.h Restructure the src directory 2017-08-10 18:45:00 +02:00
ScrubP.h Restructure the src directory 2017-08-10 18:45:00 +02:00
Split.c Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
Split.h Account.c to Account.cpp 2017-12-21 07:39:32 -05:00
SplitP.h Restructure the src directory 2017-08-10 18:45:00 +02:00
SX-book-p.h Restructure the src directory 2017-08-10 18:45:00 +02:00
SX-book.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
SX-book.h Restructure the src directory 2017-08-10 18:45:00 +02:00
SX-ttinfo.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
SX-ttinfo.h Restructure the src directory 2017-08-10 18:45:00 +02:00
Transaction.c Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
Transaction.h Transaction members Timespec->time64 2018-01-08 13:01:29 +11:00
TransactionP.h Transaction members Timespec->time64 2018-01-08 13:01:29 +11:00
TransLog.c Bug 772776 - VERY large queries (over 11000 fields in IN clause) slow... 2018-04-14 10:18:01 -07:00
TransLog.h Restructure the src directory 2017-08-10 18:45:00 +02:00
xlate.pl Restructure the src directory 2017-08-10 18:45:00 +02:00

This directory contains code for the accounting engine.
Its fairly clean but far from perfect, and it certainly
lacks advanced features.

There should be no GUI code in this subdirectory, and,
ideally, it should build cleanly and independently of 
any GUI elements or assumptions.

For design documentation, please see the file "design.txt",
and also, look at the header files carefully.  The documentation
for each routine is in the header files for that routine.

September 1998