[NTG-context] Bug: context/mtxrun makes Firefox eat up cpu

Hans Hagen j.hagen at xs4all.nl
Thu Nov 5 12:25:58 CET 2020


On 11/5/2020 11:48 AM, Sylvain Hubert wrote:
> After dozens of compilations of various minimal examples using the newly 
> installed context, the problem reappeared.
> 
> Removing tex/texmf-cache does not help.
Removing firefoxe does ... when I open e.g. the cnn website in firefox 
(for instance to keep an eye on crazy elections), that program takes 650 
MB memory and 44% GPU while edge (or chrome) takes 270 MB mem and 3% 
GPU. Add a few more tabs and firefox will easily eat up gigs of mem.

Now, I don't know how it manages memory but the tex engine needs a few 
reasonable sized arrays but in large allocs and then it manages its own 
memory from that pool, Lua needs more mem (could be scattered due to 
allocs i guess), and soem garbage collection can kick in, and browsers 
... well i suppose lots of allocations and it also depends on the 
jasvascript vm.

So, I would not be surprised if after some runs of these programs you 
end up with scattered memory. I suppose that at some point the operating 
system (when in rest) will sort things out. When I make a format file it 
normally takes a few seconds. When I let firefox run wild on memory (top 
out mem and then let it give back some), it can take twice as much to 
make a format, but after quitting firefox it's all ok again.

Anyway, already long ago I decided that firefox is a memory hog so 
whenever I do something that takes more time than I susspect, I close 
firefox. Actually I often close browsers when i don't need them, also 
because they always seem to be busy with something (also the network).

Tex is just juggling some bytes. In the past tex and distributioen were 
considered large ... nowadays they are small compared to whatever you 
install and run. And in luametatex/context the performance bottleneck is 
lua, not the core tex engine.

Of course you could consider swithcing to another operating system.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list