Why does MATLAB cause my CPU to spike even when MATLAB is idle in MATLAB 8.0 (R2012b)?

74 views (last 30 days)
Using the Linux "top" command, I can see that MATLAB is using a great deal of the CPU, even when MATLAB is idle, i.e. not running any programs.
After some time (sometimes 45 minutes, sometimes a couple of hours) of opening a session of MATLAB, MATLAB's CPU usage will spike for a few seconds (2-5 seconds) and then drop for a few seconds. This will continue to happen until MATLAB is closed.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 10 Mar 2016
This is a bug in MATLAB 8.0 (R2012b) and later releases. This issue may appear in MATLAB R2012a as well. This issue may be related to the new Help browser.
Beginning in MATLAB R2012b, the Help Browser uses a different renderer called the JxBrowser, which provides an enhanced help browsing experience. Because this may be an issue with the JxBrowser, try disabling the JxBrowser and instead use the HTML renderer (which may provide a slightly degraded Help Browser experience).
Launch a new session of MATLAB, and try to disable JxBrowser completely during this session, which can be done by executing the following command at the beginning of a MATLAB session:
 
com.mathworks.mlwidgets.html.HtmlComponentFactory.setDefaultType('HTMLRENDERER');
This will set a preference disabling JxBrowser, which can be undone with the command:
 
com.mathworks.mlwidgets.html.HtmlComponentFactory.setDefaultType([]);
NOTE: This bug has been fixed in MATLAB R2015a and later versions. Here is a link to its external bug report:
https://www.mathworks.com/support/bugreports/914291
 
  18 Comments
Alex R.
Alex R. on 7 Oct 2022
Edited: Alex R. on 7 Oct 2022
6 years later, I'm still seeing this in 2019b and 2021b on windows 10 x64 so it doesn't look fixed at all ... the jxbrowser-chromium.exe subprocess of Matlab.exe comes on every time I use the Help and then within minutes it starts keeping 100% cpu usage.
The workaround helped get rid of it, but now the Matlab help hangs when I try to use it (i get blank pages when clicking on sections or in the ToC)

Sign in to comment.

More Answers (4)

Anders Glent Buch
Anders Glent Buch on 26 Oct 2015
Edited: Anders Glent Buch on 26 Oct 2015
Just in the hope of keeping this topic alive - the problem persists on Ubuntu 15.04 x64 using latest and greatest version of MATLAB (R2015b). Using JxBrowser causes frequent CPU spikes (100 % usage of one of my 4 cores), wheres HTML renderer does not.
However, this time all text in the HTML rendered help is scrambled. Have a look:
I noticed similar artifacts in the doc search input in the top right corner when resizing the main MATLAB window:

DGD
DGD on 12 Dec 2015
Edited: DGD on 12 Dec 2015
If you only need to use the Help occasionally, you can start a second instance of Matlab, keep it on the side, use the Help there, and when you don't need it, just quit that instance of Matlab. It's a silly solution, but it's better than the annoying cpu load or useless scrambled HTML renderer.
If you need the Help to be available all the time, well, then you need help.
  1 Comment
Walter Roberson
Walter Roberson on 13 Dec 2015
On my OS-X system, the help browser takes a fair bit of time to come up, enough so that I usually start thinking it is not going to come up, as if I had used the wrong commands. It is long enough that if I bring it up then I am going to want to leave it up to avoid waiting that long when I need it.
I use the documentation quite a bit. I do not happen to use the help browser much, though, as I usually google search instead. I like to be sure that I get the details right when I answer questions.

Sign in to comment.


timo
timo on 22 Jul 2018
I observe a lot of lag in Live editor and i see i have like 5 JxChromium Native process opened. I dont understand why Live Editor with Symbolic calculations makes it so laggy,

Helder Oliveira
Helder Oliveira on 17 Oct 2018
What is the default parameter of this command?
I'm using MATLAB 2018a in Kubuntu 18.04.
Using the HTMLRENDERER the images are not loaded into the doc. I try to revert using the command using the [] but I causes a strange behavior I open the docs but when I close it the matlab window is froze!
  1 Comment
Helder Oliveira
Helder Oliveira on 17 Oct 2018
Actually I figured it out! I tried to put 'JxBrowser' as parameter and Ive got the error below which says the only two possibilities.
Back to the HTMLPANEL solved my problem.
>> com.mathworks.mlwidgets.html.HtmlComponentFactory.setDefaultType('JxBrowser');
Invalid type. Please enter one of:
HTMLPANEL - uses JxBrowser for HTML rendering
HTMLRENDERER - uses HTMLRenderer, using ICE browser for HTML rendering
>> com.mathworks.mlwidgets.html.HtmlComponentFactory.setDefaultType('HTMLPANEL');

Sign in to comment.

Products


Release

R2014b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by