Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Log widget improvements #8337
This PR largely overhauls LogWidget to drastically decrease its memory usage and negative impact on UI responsiveness.
In the worst case, spammy enough logs will cause LogWidget to lock up an entire Qt UI (as reported by @JMC47 and confirmed by my tests)). Additionally, both the widget itself and its log buffering functionality (designed so it never updates more than 200 lines in one go) were unbounded and could grow infinitely, taking GB's of RAM and maybe even causing Qt to run out of memory (I think that's why UI locked up eventually).
My changes include:
@Ebola16 @JMC47 I updated the PR with a removal of
My profiling shows that this change improves logging performance further, but testing is appreciated.
There will be more coming (a ring buffer I mentioned earlier), so performance may still be in non-final state. Seeing how I already corrected two design decisions in consecutive commits, I think I'll rewrite history completely before removing the [WIP] tag.
2 times, most recently
Aug 30, 2019
I didn't do any quantitative analysis but the latest version of this PR seems to be even better! My test case was the workaround for https://bugs.dolphin-emu.org/issues/10791 (DSP LLE recompiler when using Project M Launcher and its derivatives). This tends to spam a TON of error messages with certain builds. After exiting emulation, the error message spam stops significantly sooner in this PR when compared to Master.
Function-wise LGTM but I don't feel comfortable enough with my coding skills to review the code itself.