Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Scrolling in results field stutters and spikes CPU usage #622
What did you do?
Scrolled within the results panel to view the data from a query with 33 columns and 100 rows.
Overall CPU usage was around 3% at the time.
What did you expect to happen?
Before I updated to version 1.5 several minutes prior, scrolling in the results panel was smooth.
What actually happened?
Now, when I scroll, the scrolling has a very low frames per second view update and does not scroll smoothly. Additionally, the CPU usage for Postico jumps from ~0.1% to up to 97.4% at the highest.
What software versions are you using?
Thanks for reporting this. I was able to confirm, there is a significant performance regression in scrolling. Profiling shows that the cause of the issue is extremely poor performance of named colors (they are used for dark mode support).
I was able to come up with a workaround for the issue -- we can resolve named colors when we first need them and cache the results. We only need to make sure to invalidate the colors correctly when the user switches between dark mode / light mode.
Can you try the following build and let me know if scrolling is snappy again?
I had a similar issue, immediately noticing sluggishness in the "SQL Query" workspace...had to downgrade to 1.4.3.
This download you posted above made things a bit better, but still noticeably sluggish so I have downgraded again.
@mwburke CPU spikes when scrolling are normal, drawing lots of text is CPU intensive.
We could enable "smooth scrolling", which might reduce CPU usage when scrolling slowly, but it would eat up a lot of memory (hundreds of megabytes, especially on large displays)
@newhouse I've only made improvements to the table view, but the same problem with the colors might also affect the text area. I'll see if I can fix it in a similar manner.
I still have a similar problem, and i had to downgrade to 1.4.4 (im using high sierra).