gnucash stable: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Thu Jun 22 16:56:51 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/6b48c6ce (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f49b6690 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/d56d68b7 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/9ac12db6 (commit)
	from  https://github.com/Gnucash/gnucash/commit/cf3d2f36 (commit)



commit 6b48c6ced73fb435e2627e20dbeca94c02195f30
Merge: cf3d2f3656 f49b669052
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Jun 22 13:53:36 2023 -0700

    Merge Simon Arlott's 'bug-798564' into stable.

commit f49b6690529d90cc31a67f77faf269921d28f35d
Author: Simon Arlott <sa.me.uk>
Date:   Sat Jun 17 20:19:29 2023 +0100

    Bug 798564 - GnuCash is slow when there are a lot of open registers
    
    When loading the book on startup, GnuCash takes a long time. This is partly
    because gnc_restore_all_state() is loading data for every register page and
    I have 35+ registers open.
    
    Register loads should be deferred on tabs that are not visible until those
    tabs are focused, like what already happens for restored open reports.
    
    Every time a change to a transaction is saved by navigating away from it,
    the UI freezes for almost a second. This is because
    gnc_split_register_move_cursor() calls gnc_gui_refresh_internal() which
    refreshes all the registers.
    
    Register refreshes should be deferred on tabs that are not visible until
    those tabs are focused again.
    
    Use focus information to suppress the last part of the refresh_handler()
    if the ledger isn't currently visible. When it becomes visible again, run
    the deferred refresh step.
    
    Don't immediately load or refresh the ledger (this will happen the first
    time it is focused instead).

commit d56d68b7abdfb0fde49c2383f0040f2a5bcf8ee5
Author: Simon Arlott <sa.me.uk>
Date:   Sat Jun 3 11:03:32 2023 +0100

    [gnc-plugin-page] Don't automatically focus pages when they are recreated
    
    This has to disregard the "open adjacent" preference to get them to be in
    the right order because the first page will remain focused until the
    restore is complete.
    
    Change the register page so that it doesn't assume it will be in focus on
    creation.

commit 9ac12db68fb9bf6ee7db359c77bb77fdc59c0926
Author: Simon Arlott <sa.me.uk>
Date:   Sat Jun 3 10:24:13 2023 +0100

    [gnc-ledger-display] Consolidate refresh functions
    
    gnc_ledger_display_gl() is called to create the ledger:
    1. Exclude template accounts (unconditionally)
    2. Calls gnc_ledger_display_internal()
    
    gnc_ledger_display_internal():
    1. Run query
    2. Set watches
    3. Load splits
    
    refresh_handler() is called to refresh all pages when a change happens:
    1. Check if the number of subaccounts has changed
    2. Exclude any template accounts (for specific register types)
    3. Run query
    4. Set watches
    5. Load splits
    
    gnc_ledger_display_refresh() is called by the register plugin:
    1. [Doesn't check if the number of subaccounts has changed]
    2. Exclude template accounts (for specific register types)
    3. Run query
    4. Set watches
    5. Load splits
    
    The last two are inconsistent because they don't both check if the number
    of subaccounts has changed.
    
    Make it easier to conditionally refresh the ledger only when it's visible
    by consolidating the code from these functions into one place within
    gnc_ledger_display_refresh() and gnc_ledger_display_refresh_internal().



Summary of changes:
 gnucash/gnome-utils/gnc-main-window.cpp           |   9 +-
 gnucash/gnome-utils/gnc-plugin-page.c             |   3 +-
 gnucash/gnome/gnc-plugin-page-register.c          |   5 +-
 gnucash/register/ledger-core/gnc-ledger-display.c | 110 ++++++++++++++--------
 gnucash/register/ledger-core/gnc-ledger-display.h |   3 +
 5 files changed, 83 insertions(+), 47 deletions(-)



More information about the gnucash-patches mailing list