Subject: mailing-list for TeXmacs Users
List archive
From : address@hidden- To: address@hidden
- Subject: Re: Constant Use of 100% CPU
- Date: Wed, 29 Jul 2020 17:06:43 +0000
- Authentication-results: nx7.dnslinks.net; spf=pass (sender IP is 127.0.0.1) smtp.mailfrom=address@hidden smtp.helo=nx7.dnslinks.net
Hello, I have been using TeXmacs very heavily since 2003, and I think it is a
really wonderful program. This problem of TeXmacs often constantly using 100%
of the CPU resources started for me many years ago, around the era of TeXmacs
1.0.7.15. It seemed to me to start around the time when TeXmacs was being
upgraded so whole books and theses could be written with it, which is not
something I use TeXmacs for. Other possibly related problems that seemed to
start around then are (1) that sometimes, when typing into a new paragraph
near the start of a long TeXmacs file, TeXmacs's response time to new typing
seems to slow down drastically, as if TeXmacs is trying to recalculate the
layout of the entire remainder of the file, most of it far off the bottom of the
computer screen, every time you type a new character. And (2), if you are
using Maxima in TeXmacs, and you have some very long formulae, typically
\frac{something}{something}, with a huge numerator, so that it cannot be
wrapped, so the formula is so long horizontally that the length of the
horizontal scrollbar is only say 1/20 or so of its range, then TeXmacs can
sometimes take an enormous time to respond when you enter a carriage return, I
mean 15 minutes or more to come back to life after you enter the carriage
return. (Perhaps this is a separate issue with the Maxima interface, I am not
sure.)
The reply below by Massimiliano Gubinelli is the first time I have seen any
clue to what might be causing TeXmacs suddenly and spontaneously to start
using 100% of CPU resources, which can sometimes carry on for substantial
amounts of time. For the last 9 years I have been using dual processor
netbooks, so what happens when TeXmacs tries to use 100% of CPU resources is
that it actually uses 50% of CPU resources, i.e. 100% of the resources of 1 of
the 2 CPUs. So I am able to carry on working when TeXmacs is using 100% of
the resources of 1 of the 2 CPUs, so it is not a critical problem. I
typically only notice it when netbook resources are stretched, and I look at
resource usage in KSysGuard. I then often find that TeXmacs is using 100% of
the resources of 1 of the 2 CPUs for 10 minutes or more, even when TeXmacs is
supposed to be doing nothing at all.
I would very much appreciate if you could give some more pointers to where in
the source code I should look for the problem. I am too busy at the moment to
look into it straight away, but I will look into it further when I can find the
time.
I should mention that I am still using TeXmacs 1.0.7.15, which I build from
source whenever I have to upgrade my operating system. The reason for this is that I use TeXmacs as a science notebook program, for which TeXmacs 1.0.7.15 is brilliant. For writing a paper, I write small parts of it in TeXmacs, then export them to LaTeX, for incorporation into the full paper in LaTeX. But in the period before 1.0.7.15, TeXmacs seemed to be drifting towards other purposes, that were making it less suitable for the way I use it. In particular, the introduction of heavy duty book formatting and thesis formatting right the way through a file seemed to coincide with the start of the problems I mentioned above, including the problem of TeXmacs suddenly and spontaneously starting to use 100% of the CPU resources of 1 CPU for extended periods of time, even when it is supposed to be doing nothing. For these and various other reasons I eventually decided to stick with TeXmacs 1.0.7.15, which was a good release, and I have work arounds for the relatively few problems it has, for using TeXmacs as a science notebook program. In case it is relevant: For the past 3 years I have been using the Trinity desktop for Linux, which is a continuation of KDE 3.5, and I also use various KDE4 programs in Trinity, and before that I was using the KDE4 desktop.
Thanks very much,
Chris Austin
On Wednesday 29 Jul 2020 10:19:03 Massimiliano Gubinelli wrote:
Maybe, something is going wrong in your runloop. If you look into
Plusings/Qt/qt_gui.cpp you see that we use a QTimer to fire an update
procedure which runs TeXmacs internal update routines (reading input events
from a secondary queue, performing changes and updating the window graphic
surfaces). Maybe something is changed in the version of Qt5 which you have
and this makes this bug appear, it does not seems to me I have seen it on
my Mac (with Qt4). If you want to try to debug you can see wether the
update function is run too often and why. Usually the algorithm make sure
that, unless there is input to handle, the update function is called with
reasonable timeout (there are delayed events which are produced internally
in TeXMacs which have to be handled anyway, like the update of the footer
bar).
hth,
max
> On 28. Jul 2020, at 15:01, Sebastian Miele <address@hidden>
> wrote:
> > I am running a TeXmacs from the current master branch of
> github:texmacs/texmacs. I am on Arch Linux.
> > Under some circumstances, TeXmacs uses 100% CPU of one processor, even
> if none of its windows is visible, and (as far as I understand) should
> have nothing to do. I tried to find a recipe to reliably reproduce that
> behaviour, but failed until now. When it happens, it seems to not hurt
> functionality/reactivity. When the issue arises, it seems to persist
> until I quit TeXmacs.
> > Is this issue already known?
- Constant Use of 100% CPU, Sebastian Miele, 07/28/2020
- Re: Constant Use of 100% CPU, Darcy Shen, 07/28/2020
- Re: Constant Use of 100% CPU, Sebastian Miele, 07/28/2020
- Re: Constant Use of 100% CPU, Sebastian Miele, 07/28/2020
- Re: Constant Use of 100% CPU, Darcy Shen, 07/28/2020
- Re: Constant Use of 100% CPU, Sebastian Miele, 07/28/2020
- Re: Constant Use of 100% CPU, Darcy Shen, 07/28/2020
- Re: Constant Use of 100% CPU, Sebastian Miele, 07/28/2020
- Re: Constant Use of 100% CPU, Sebastian Miele, 07/28/2020
- Re: Constant Use of 100% CPU, Massimiliano Gubinelli, 07/29/2020
- Re: Constant Use of 100% CPU, Sebastian Miele, 07/29/2020
- <Possible follow-up(s)>
- Re: Constant Use of 100% CPU, chris, 07/29/2020
- Re: Constant Use of 100% CPU, Sebastian Miele, 07/29/2020
- Re: Constant Use of 100% CPU, Darcy Shen, 07/28/2020
Archive powered by MHonArc 2.6.19.