gnucash maint: Bug 798237 - Logging during XML file loading degrades performance...
John Ralls
jralls at code.gnucash.org
Tue Sep 14 18:22:10 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/74d06308 (commit)
from https://github.com/Gnucash/gnucash/commit/574f567b (commit)
commit 74d0630867c6cfbb509db2f4ca7edb722db82956
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Sep 14 15:15:11 2021 -0700
Bug 798237 - Logging during XML file loading degrades performance...
significantly
Modify the DEBUG and PINFO macros to return unless qof_log_check is
true. Replace almost all direct calls to g_debug and g_message with
DEBUG and PINFO respectively.
Track the highest logging level sent to qof_log_set_level to provide a
short-circuit return in qof_log_check. Remove setting GNC_MOD_TESTS to
QOF_LOG_DEBUG so that the short-circuit threshold isn't defeated by
always being DEBUG.
Net result: 33% improvement in xml load times.
Summary of changes:
bindings/core-utils.i | 2 +-
gnucash/gnome-utils/gnc-autosave.c | 26 ++++----
gnucash/gnome-utils/gnc-dense-cal.c | 35 +++++-----
gnucash/gnome-utils/gnc-frequency.c | 2 +-
gnucash/gnome-utils/gnc-gobject-utils.c | 8 ++-
gnucash/gnome-utils/gnc-main-window.c | 2 +-
.../gnc-sx-instance-dense-cal-adapter.c | 8 ++-
gnucash/gnome/dialog-payment.c | 9 ++-
gnucash/gnome/dialog-print-check.c | 58 ++++++++--------
gnucash/gnome/dialog-sx-editor.c | 6 +-
gnucash/gnome/dialog-sx-editor2.c | 10 +--
gnucash/gnome/dialog-sx-from-trans.c | 6 +-
gnucash/gnome/dialog-sx-since-last-run.c | 6 +-
gnucash/gnome/gnc-plugin-business.c | 2 +-
gnucash/gnome/gnc-plugin-page-sx-list.c | 4 +-
gnucash/gnucash-core-app.cpp | 6 +-
gnucash/import-export/aqb/assistant-ab-initial.c | 2 +-
gnucash/import-export/aqb/gnc-ab-gettrans.c | 2 +-
gnucash/import-export/aqb/gnc-ab-utils.c | 12 ++--
gnucash/import-export/aqb/gnc-plugin-aqbanking.c | 10 +--
.../import-export/bi-import/gnc-plugin-bi-import.c | 2 +-
.../customer-import/gnc-plugin-customer-import.c | 2 +-
gnucash/import-export/log-replay/gnc-log-replay.c | 3 +-
gnucash/import-export/test/CMakeLists.txt | 1 +
gnucash/register/register-core/formulacell.c | 10 +--
gnucash/register/register-core/pricecell.c | 4 +-
gnucash/report/gnc-report.c | 2 +-
libgnucash/app-utils/gfec.c | 7 +-
libgnucash/app-utils/gnc-accounting-period.c | 13 ++--
libgnucash/app-utils/gnc-sx-instance-model.c | 38 +++++------
libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp | 17 ++---
libgnucash/backend/xml/gnc-transaction-xml-v2.cpp | 1 +
libgnucash/backend/xml/sixtp.cpp | 18 ++---
libgnucash/backend/xml/test/test-xml-pricedb.cpp | 8 +--
libgnucash/core-utils/gnc-glib-utils.c | 2 +-
libgnucash/core-utils/gnc-glib-utils.h | 2 +-
libgnucash/engine/gnc-engine.c | 12 ----
libgnucash/engine/gnc-engine.h | 1 -
libgnucash/engine/gncOwner.c | 4 +-
libgnucash/engine/qoflog.cpp | 40 +++++------
libgnucash/engine/qoflog.h | 77 +++++++++++-----------
libgnucash/engine/qofquery.cpp | 5 +-
libgnucash/engine/qofquery.h | 1 -
libgnucash/engine/test/utest-Transaction.cpp | 2 +
libgnucash/gnc-module/example/gnc-plugin.example.c | 2 +-
45 files changed, 250 insertions(+), 240 deletions(-)
More information about the gnucash-patches
mailing list