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
Long running query uses 10% CPU on MacBook Pro #610
What did you do?
I executed a long-running query against a Redshift database. It's a
What did you expect to happen?
Very little CPU utilisation, as the only interface elements changing are the spinner and counter in the status bar.
What actually happened?
~10% CPU utilisation on my 2017 MacBook Pro. I have attached a sample from Activity Monitor.
What software versions are you using?
Postico version: 1.4.2 (2845)
macOS version: 10.14.1 (18B75)
PostgreSQL version: PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.4896
Thanks for the sample! It looks like the culprit is the status display. It updates every 100ms, and apparently drawing that is a lot more expensive than I expected.
I've made two changes:
In my testing, Postico now uses under 1% CPU for long running queries.
Can you try this build and let me know if it works for you?