-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
voting: Poll tab locks up GUI and takes unacceptably long on slower machines #2618
Comments
From Discord... iFoggz (Paul Jensen) — Today at 5:35 PM Jim Owens — Today at 5:51 PM |
Note I said... or PC's with regular HDD's instead of SDD's. Yours fits that definition since you put the wallet on an HDD. |
@Gawiga relief is on the way... at least for the apparent lockup part. |
On slower machines such as older ARM SBC's or PC's with regular HDD's instead of SDD's, the Poll tab exhibits poor performance.
This has not been as noticeable until now, where there are four simultaneous polls in progress at the same time, all with relatively high participation rates. But with these many polls, the performance problems are leading some people with slower machines to get frustrated, and this shows that while the voting system is of extremely high integrity, it will not scale well.
To tabulate the current results of the poll, the GUI must traverse the Poll registry and call functions that resolve every unspent UTXO in every vote in every poll. This is very I/O intensive, since @cyrossignol had elected for both memory conservation and simplicity to leave these details out of memory. The details are only temporarily kept in memory as the poll results are being tabulated, and then the summary is maintained in memory.
This choice saves on the memory footprint and also simplifies situations where there is a chain reorg, which could roll-back polls themselves or votes on a poll, because the entire structure is refreshed, but it places a great strain on the computer CPU and IO as a result.
There are a few ideas to deal with this issue:
I have, in my optimize_poll_locking branch, instrumented the functions involved in the poll refresh with MilliTimer so that we can see where the time is being spent.
Please see attached two runs from the opposite end of the spectrum:
Note that four polls were active with ~961 votes total, which involve thousands of UTXO's to check.
This is a factor of 91x!!
refresh polls run on really fast computer (Intel i9 13900K).log
refresh polls run on slow computer (Odroid XU4).log
The text was updated successfully, but these errors were encountered: