A solution to excessive CPU use in Big Sur

A forum for issues on macOS; the UNIX and Linux forums may have relevent posts

A solution to excessive CPU use in Big Sur

Postby warrennn on Wed Apr 07, 2021 8:14 pm

I have been running Dyalog APL 18.0 on my M1 MacBook Air which only runs Big Sur. I have noticed that the 4 "efficiency cores" of the M1 CPU run at about 25% continuously, for a cumulative CPU load of about 95%, while nothing is being done in the app. I asked the experts at Dyalog and found that there is a bug in Big Sur which causes this and the fix is simple.

The fix is to go to the Dyalog app in one's Application folder and right click on the icon. Select "show package contents" from the pop-up menu and your will see the directory structure of the app in the Finder. Navigate to Dyalog-18.0.app/Contents/Resources/Dyalog/mapl and open mapl in a text editor. Add the following string to the file: export ENABLE_CEF=0. Then quit and restart Dyalog and the problem should be fixed.

Hope this helps.
Posts: 1
Joined: Tue Apr 06, 2021 7:08 pm

Re: A solution to excessive CPU use in Big Sur

Postby petermsiegel on Wed Apr 07, 2021 8:55 pm

I believe that "fix" is useful only if HTMLRenderer is not used:
Code: Select all
⍝ With the "FIX"
head←'<head><title>Hello, World!</title><head>'
body←'<body><b>APL</b> + </i>HTML</i> = <u>TRUE</u></body>'
'hr' ⎕WC 'HTMLRenderer' ('HTML' (head,body)) ('Size' (10 20))

LIMIT ERROR: The object could not be created
      'hr'⎕WC'HTMLRenderer'('HTML'(head,body))('Size'(10 20))
Posts: 153
Joined: Thu Nov 11, 2010 11:04 pm

Re: A solution to excessive CPU use in Big Sur

Postby Morten|Dyalog on Fri Apr 09, 2021 11:51 am

The fundamental problem here is that the version of the Chromium Embedded Framework (CEF) that we built in to version 18.0 seems to enter a CPU loop approximately 5 minutes after APL is started, regardless of whether you use the HTMLRenderer.

We have not been able to build APL with a newer CEF without also switching to doing the builds under Big Sur, which would make the product unusable to anyone running earlier versions of the OS. As a matter of principle we do not change the build platform for a release, once it has been shipped.

We have decided to release a new build of Dyalog APL v18.0 that we will make available to both commercial and non-commercial users next week: it will default ENABLE_CEF to 0 if started under Big Sur. If you do want to use the HTMLRenderer under Big Sur, please contact Dyalog to sign up to receive pre-releases of version 18.1 when they become available. Version 18.1 embeds a newer version of CEF, but is built under (and requires) Big Sur.
User avatar
Posts: 458
Joined: Tue Sep 09, 2008 3:52 pm

Return to macOS

Who is online

Users browsing this forum: No registered users and 1 guest