Author Topic: Increased CPU usage on m1 Mac  (Read 1175 times)

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Increased CPU usage on m1 Mac
« on: August 14, 2022, 09:09:09 AM »
Using SE 27.0.0.1 on an m1 Mac I notice that SE idles at around 35% to 40% CPU usage continuously.  26.0.3.1 with the same tag files and files open idles at between2% and 4% CPU usage.  Is there a reason for the increased CPU usage? 

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Increased CPU usage on m1 Mac
« Reply #1 on: August 15, 2022, 10:58:45 AM »
Could you bring up Activity Monitor and do a Sample Process on SlickEdit.  Maybe you could catch where it is spending time.  Also, you could turn on Slick-C profiling and see if that is where time is being spent.

FWIW.  I have seen anomalies in CPU usages also, but have not been able to catch it I the act, perhaps Heisenberg is haunting both our Macs.

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Re: Increased CPU usage on m1 Mac
« Reply #2 on: August 16, 2022, 03:30:40 AM »
Hi Dennis
I grabbed a process sample and a Slick-C profile whilst it was using excessive CPU.  I hope they're of some use to you.
I also noticed that in my case, Heisenberg seems to be one particular source file.  If I have that file as the selected tab, SE uses a lot of CPU, switching to another tab, in this case GitClass.e (opened by the profiler) the CPU usage drops to the normal level I would expect.  The file is a simple WXWindows test file, not much to it, so I've attached that as well.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Increased CPU usage on m1 Mac
« Reply #3 on: August 26, 2022, 08:24:50 PM »
I was also able to reproduce this today.  Between your sample and what I found, I have a lead on what might be happening.

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Re: Increased CPU usage on m1 Mac
« Reply #4 on: August 26, 2022, 08:50:10 PM »
Hi Dennis

That's good to hear, let's hope it's an easy fix.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Increased CPU usage on m1 Mac
« Reply #5 on: August 31, 2022, 02:56:26 PM »
Just for a confirmation.  Do you have Symbol Coloring and the Minimap enabled?  I have identified multiple issues that I will be optimizing for Beta3.
« Last Edit: August 31, 2022, 02:58:41 PM by Dennis »

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Re: Increased CPU usage on m1 Mac
« Reply #6 on: August 31, 2022, 08:27:26 PM »
Hi Dennis

Yes, I have both symbol colouring and the minimap enabled.  Looking forward to beta 3.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Increased CPU usage on m1 Mac
« Reply #7 on: September 08, 2022, 08:38:43 PM »
I have put in a multitude of improvements that should keep the steady-state performance reasonable.  With Symbol Coloring, because it can work on off-screen pages and other open windows in the background while the editor is idle, it can, in fact, depending on your settings and how many files you have open, keep working for minutes after you step away from the editor, but it will eventually settle down.  A lot of the work I put in was to insure that the amount of work Symbol Coloring does is finite, for example, not retrying forever when symbol lookup has a timeout.

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Re: Increased CPU usage on m1 Mac
« Reply #8 on: October 17, 2022, 10:19:56 PM »
Hi Dennis
I've been running 27.0.0.5 for a few days now and I notice on my m1 mac that SE is still using a lot of CPU (around 35% continuously).
I disabled symbol colouring for C/C++ and I have no project open, just 1, simple C source file.
If I close the source file, CPU drops to nearly nothing, and when I open the file it increases to around 50% and stays around 40%. 
Any ideas how I can find out what SE is doing please?  No background processes are active according to SE

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Increased CPU usage on m1 Mac
« Reply #9 on: October 17, 2022, 10:56:04 PM »
Grab another Slick-C profile like you did before.  The last time, it was particularly busy with Symbol Coloring.  Is the simple C source file simple enough to share, along with your user.cfg.xml so that I could try to reproduce the problem?

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Re: Increased CPU usage on m1 Mac
« Reply #10 on: October 18, 2022, 03:33:24 AM »
Hi Dennis
Sure, no problem.  I've attached the profiler output, the source file and my user.cfg.xml. Hope it helps, if you need anything else, let me know.
(Don't worry about the name of the source file, it creates blank HD images for an emulator, your hard disk is safe.)