Page MenuHomePhabricator

[core#19011 1/3] RPCConsole, take initial chaintip data as parameter

Authored by PiRK on Mon, Jul 5, 07:52.



PR description: Reduce cs_main lock accumulation during GUI startup

During the GUI startup, there is currently an accumulation of cs_main locks due to setting initial chain state values at multiple locations (in the GUI main thread).

This PR tries to cache the initial chain state (tip height, tip time, best header, etc.) short after loading the blockindex.

The cached values are then used instead of fetching them again (and thus locking cs_main) during setting the client model.

This should fix the initial GUI blocking often experienced during or short after the splashscreen.

This is a backport of core#19011 [1/4]

Test Plan

ninja all check-all

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Mon, Jul 5, 07:52
This revision is now accepted and ready to land.Mon, Jul 5, 14:59