LyX"XeTeX is taking a long time" popup

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

"XeTeX is taking a long time" popup

Post by scottkosty »

ExecutorElassus wrote:Is there some threshold number of "completed steps per unit time" that triggers that warning? Is this timer also supposed to catch compilations if the compilation hangs (such that active compilation stops, but doesn't exit, getting stuck), and not just measure/respond to how long the job is taking?

Cheers,

EE
The goal of the timer is that few uses of LyX lead to such long compilation times so it is to allow the user to cancel a process that was unexpectedly long or that is in an infinite loop due to a bug (e.g. some bugs cause LaTeX compilation to enter an infinite loop, such as http://www.lyx.org/trac/ticket/10791).

To make sure I understand: your goal is to disable the message, right? What is the exact message that you receive? Also, are you interested in compiling LyX if I spend the time to make a patch for you that disables the message?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

ExecutorElassus
Posts: 94
Joined: Wed Sep 07, 2011 3:14 pm

"XeTeX is taking a long time" popup

Post by ExecutorElassus »

The problem *isn't* that the popup occurs. The problem is that it isn't measuring compilation time correctly. When I'm running the CPU at 100%, that popup comes up after 3 minutes. If the CPU is otherwise idle, compilation runs for 8-9 minutes with no popup at all. So it isn't measuring "time spent compiling" exactly, but is deciding based on some other factor that the compilation process is taking too long.

So I don't think what's happening here is the actual timer, but rather that it's deciding that the computer is stuck in an infinite loop even when it isn't.
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

"XeTeX is taking a long time" popup

Post by scottkosty »

ExecutorElassus wrote:The problem *isn't* that the popup occurs. The problem is that it isn't measuring compilation time correctly. When I'm running the CPU at 100%, that popup comes up after 3 minutes. If the CPU is otherwise idle, compilation runs for 8-9 minutes with no popup at all. So it isn't measuring "time spent compiling" exactly, but is deciding based on some other factor that the compilation process is taking too long.

So I don't think what's happening here is the actual timer, but rather that it's deciding that the computer is stuck in an infinite loop even when it isn't.
I see. So you just want the timer to be consistent. You would prefer for it to be based on wall clock, as opposed to being sensitive to whether your CPU is at 100%? Also can you please give the exact message that pops up?
ExecutorElassus
Posts: 94
Joined: Wed Sep 07, 2011 3:14 pm

"XeTeX is taking a long time" popup

Post by ExecutorElassus »

So far as I understand, compiling in Lyx is a single-core operation, yes? It runs one core at 100%. If that's the case, unless it's somehow spawning child processes that are running on other cores, it shouldn't care what the other CPU cores are doing, right? The issue arises because whatever criteria that process is using to determine that the compile process has gotten stuck in some kind of loop/unresponsive state is too simplistic. For example, on multicore systems, is it counting CPU usage % by aggregate? If that's the case, a single core running at 100% would only show as 12.5% usage, whereas running a compile job in the background at the same time would then show the CPU at 100%, much higher than it is normally.

next time I'm running a big compile job, I'll try compiling again and let you know the exact popup message.

Cheers,

EE
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

"XeTeX is taking a long time" popup

Post by scottkosty »

ExecutorElassus wrote: next time I'm running a big compile job, I'll try compiling again and let you know the exact popup message.
Sounds good. I just want to make sure I know what message you're talking about before I take the time to look further at the code.
ExecutorElassus
Posts: 94
Joined: Wed Sep 07, 2011 3:14 pm

"XeTeX is taking a long time" popup

Post by ExecutorElassus »

Back. The exact message is
the command
xelatex "[filename.tex]"
has not yet completed.

Do you want to stop it?
[STOP][Let it run]
Cheers.
Addendum: also, the resulting PDF will not display until I click "Let it run," even if compilation has finished.
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

"XeTeX is taking a long time" popup

Post by scottkosty »

OK this was implemented at the following commit: https://www.lyx.org/trac/changeset/1eb41a88/lyxgit

You can see the ticket that lead to the commit here:
https://www.lyx.org/trac/ticket/8032

If you are willing to compile LyX, I can give you a patch that gets rid of the message.
Post Reply