gtg icon indicating copy to clipboard operation
gtg copied to clipboard

Dark mode on a large dataset is extremely slow

Open nekohayo opened this issue 5 years ago • 5 comments

Try it with ./launch.sh -s "bryce". Since it's similar in size to mine, it should take multiple minutes where the CPU gets eaten up by GTG and the UI is unresponsive. On my core i5, it took 1 minute and 20 seconds. It's faster to kill GTG and restart it (which takes 7 seconds) than to wait for it to apply the change!

How come it is doing so much work "now" that it doesn't need to do otherwise on startup?

nekohayo avatar Apr 12 '21 02:04 nekohayo

Each task row has a color (from tags) that needs to be re-adapted for dark mode, this has to be done across all 3 panes

diegogangl avatar Apr 12 '21 18:04 diegogangl

Oh, you mean the tag color "squares", not the "fully colored row background based on tag color or urgency" features?

If so, that means regular app startup will also be extremely slow when running a dark theme, because it will then process every task in every view? This is quite an unexpected surprise!

nekohayo avatar Apr 15 '21 00:04 nekohayo

No, I mean the colored rows. Those are the ones that have to recalculated. Background colors have to be calculated in either mode, so there's no penalty at startup

diegogangl avatar Apr 15 '21 16:04 diegogangl

Ah... that's interesting then. Is your code recalculating even when the rows coloration features are not enabled? That's what it seems like; yet I don't have the colored rows feature turned on, so there should not be this performance impact happening when I turn on dark mode...

nekohayo avatar Apr 16 '21 03:04 nekohayo

Yup, it's not checking for that setting: https://github.com/getting-things-gnome/gtg/blob/master/GTG/gtk/general_preferences.py#L179

We could add an if over there

diegogangl avatar Apr 16 '21 12:04 diegogangl

Performance for dark mode is pretty sweet now, closing this issue

diegogangl avatar Apr 16 '24 14:04 diegogangl