Questions tagged [performance]
{performance} is for all matters related to improving compilation speed, memory usage or code length of the various parts of documents
113
questions
5
votes
1
answer
255
views
Fast way to test if an argument is an integer in LaTeX3?
In the latest version of LaTeX3, what would be the fastest way to test if an argument is a string representing an integer (without LuaTex)?
Basically, I am looking for a function that would do the ...
2
votes
1
answer
170
views
LuaTeX compilation takes much longer after upgrade of TeXLive 2020 to 2024; XeTeX runs out of memory
I had been using LuaTeX, installed with TeXLive 2020 to prepare a very large document. I upgraded to 2024 because some files related to biber provided by my Linux distrubtions were no longer ...
3
votes
1
answer
277
views
How do Beamer's approaches for skipping labeled and unlabeled slides differ?
I am trying to understand an issue in Beamer that substantially reduces efficiency of using \includeonlyframes for the purpose of improving compilation times: whenever the slide lacks a label, it ...
1
vote
0
answers
68
views
Two playing cards packages show vastly different performance
I am experimenting typesetting poker hands with two packages. I unexpectedly spotted a huge performance difference between the two.
$ cat pst-poker.tex
\documentclass{article}
\usepackage{pst-poker}
\...
5
votes
0
answers
298
views
TeXLive 2020-2021-2022 performance
Disclaimer: This post is a bit long… if you have no concerns with the TeX Live ecosystem behavior and LaTeX compile time, just ignore it! :)
I have a “complex” project (thesis template) that uses ...
1
vote
0
answers
363
views
Reducing LatexMK compilation time for a simple LaTeX document example? [closed]
Suppose I have a simple document like the following:
\documentclass{article}
\begin{document}
test
\end{document}
Suppose I need to use LuaLatex for reasons not worth mentioning here. I can use the -...
1
vote
1
answer
58
views
How to know if it's my harddrive which slows down compilation significantly?
I recently purchased a Dell work station with a the following CPU
Intel(R) Core(TM) i9-10900X CPU @ 3.70GHz
It has 10 cores with two threads each.
But when I compile a tex file as simple as
\...
9
votes
0
answers
2k
views
Is there a "fast" LaTeX compiler?
I am wondering about what the bottleneck of the compilation speed of LaTeX is (e.g. MiKTeX/MacTeX/etc). By looking at information on CPU usage, it appears that the compiler uses only a small fraction ...
2
votes
0
answers
50
views
Best image format when vectorized doesn't cut it
So I have what I think is a pretty unusual usecase, which is why I made a new question for this. I have an image I want to include in a document which is a big noisy scatterplot. If I save it as a (...
2
votes
0
answers
145
views
Can I check running time in TeXStudio?
I am trying to check my code performance and I wanted to know the running time, is there any way to know the compiling time in TeXStudio?
8
votes
2
answers
2k
views
Is there anything I can do to make LuaLaTeX compile faster? (in 2022)
I've been meaning to ask this question for a few years now - and I suppose it's time to ask it now, given the last similar question was asked (AFAIK) in 2017.
I've tried precompiling formats as ...
3
votes
0
answers
498
views
Off-Topic: What is Fast LaTeX hardware? Anything Faster than an Apple M1? [closed]
I just had the opportunity to compare the lualatex compilation times for a 650 page book on a 3.2 GHz Intel Xeon W from 2017 (iMac Pro) with the same on a new Macbook Pro 16" with M1 Max. I ran ...
5
votes
2
answers
1k
views
Optimising tabularray tables (tblr and longtblr) for processing speed
Normally I'd refrain from doing such optimisations, but I am stuck with Overleaf's time limits on a project with a lot of relevant tables.
Are there some possibilities to make tabularray's tblr and ...
0
votes
1
answer
272
views
Human readable content in PDF when opened as text file
When I open some PDFs (that were created with Tex) as text files I noticed that sometimes the content is more or less human readable. For some documents I can read almost everything, other documents ...
0
votes
0
answers
112
views
When is it necessary to run ConTeXt multiple times?
I am developing a server-side app for rendering PDF-documents for end users with ConTeXt with LMTX engine. Speed and throughput are essential to my task. I found that using --once option for compiling ...
3
votes
2
answers
207
views
Seeking a faster implementation of \CreateTheorem
Based on this answer, I wrote a macro \CreateTheorem, which can be used in the following five ways:
\CreateTheorem*{env}, which creates an unnumbered theorem-like environment env;
\CreateTheorem{env},...
1
vote
1
answer
79
views
Seeking optimization for two macros
I'm trying to write a package to help setting up the multi-language configuration and to define theorem-like environments with multi-language support. The result is great but the code takes very long ...
0
votes
0
answers
151
views
Can I daemonize LaTeX or ConTeXt for performance boost?
I need to make a web service that would generate a lot of PDFs one per request under (somewhat) high load. I was told by my college that if I set up LaTeX or ConTeXt as a daemon it will stop taking ...
2
votes
0
answers
107
views
Save the time of font selection with XeLaTeX
I'm using XeLaTeX or LuaLaTeX, with fontspec to select text font and unicode-math to select math font. On my PC, each time I compile a document, it would cost about 4~5 seconds loading the fonts (not ...
0
votes
0
answers
551
views
MikTeX (2.9 32-bit in Win7) became very slow after installing few fonts
I've installed few fonts (otf fonts converted by using autoinst, because I need to use dvips), in my MikTeX setup, I've kept the font sets in localtexmf and incorporate localtexmf root to the MikTeX ...
23
votes
4
answers
37k
views
Apple Silicon M1 Mac compatibility for MacTeX, and performance
Has anyone had the chance to test the compatibility of MacTeX on the new M1 Macs (Mac Mini, Macbook Air and Macbook Pro)? What is the performance like?
6
votes
2
answers
2k
views
What is the LaTeX3 project doing to make LaTeX run faster?
One of my biggest problems with LaTeX is the speed that it takes to process large documents. (I typeset books with LaTeX.) I have approaches, such as breaking the book into chapters and running them ...
1
vote
1
answer
114
views
luatex: latelua execution order, effect on enclosing nodelist, and its inner workings
In my musings on luatex, perhaps like alice in the wonderland, the one thing that is not quite clear is the inner workings of latelua. As I understand, all of the material to be output on a page is ...
2
votes
1
answer
113
views
Are vpacks expensive?: doing fine grain performance measurement/profiling with mixed latex & luatex code
How to do fine grain performance measurement with mixed latex, luatex code? Let's say there are two blocks of code, executed one after another. The first one is in plain latex, and the second is ...
2
votes
2
answers
329
views
Does unicode input slow down compilation?
I use a lot of unicode symbols, auto-inserted with a TeXStudio macro (e.g. "\alpha " --> "α"). This makes it easier for me to read my .tex file. These (~100) characters are declared in a .sty file ...
0
votes
0
answers
254
views
How to show Xelatex log in shell when converting latex to PDF from shell?
This is my first question here. Basically I'm a programmer. I've been working with a project where we are using xelatex to convert latex to PDF. We are using Ubuntu 18 server environment and installed ...
5
votes
0
answers
335
views
Speed up compilation LuaLatex Windows TexLive
I would like to pre-compile the preamble to speed up the compilation of my LuaLatex documents.
I have seen several questions regarding this (eg: Question 1, Question 2, Question 3), but all are ...
6
votes
1
answer
505
views
How to time code execution in TeX?
Throughout time, during my conversations with members of TeX Exchange, I ran across a few ways to time execution of the code. But the pieces of this information are scattered throughout my account's ...
5
votes
2
answers
355
views
What definition takes up more memory, \def or \chardef (considering \def contains a single character)?
The question is entirely in the title. Let's take \def\testName{a} and \chardef\testName`\a. Which of the definitions requires more memory?
0
votes
0
answers
188
views
LEd (LaTeX Editor) lagging while typing commands
Hello I am using LEd editor. It is my favorite editor and I would like to keep using it. But for some time it is unusable because it laggs so much when I start typing commands. Whenever I type '\' and ...
20
votes
2
answers
797
views
Expandable test for an empty token list—methods, performance, and robustness
With ε-TeX, the go-to method for testing if a <token-list> is empty is the following test:
\if\relax\detokenize{<token-list>}\relax
% empty
\else
% not empty
\fi
The method ...
8
votes
2
answers
2k
views
How to measure the compilation time of a document?
I have a long .tex file and I want to know the compilation time: duration, begin - finish.
Can I add this information to the PDF or display it in .log file?
5
votes
2
answers
330
views
Fast membership test for integer lists/sets
Say we have big list of integer numbers, stored as comma-separated values in a macro or token register. Now we want to test in a loop for every integer n = 1, 2, ..., N if n occurs in the list of ...
0
votes
0
answers
168
views
TeX capacity exceeded: Is available main memory size depending on machines RAM?
I had the case that I ran into TeX capacity exceeded several times when compiling a pgfplot with lots of data points on a machine with 4096 MB RAM.
Now I've tried to compile the very same file on a ...
5
votes
0
answers
266
views
Excessive memory use with unicode-math/Fira Sans and xfrac
When trying to use the Greek symbols in the font Fira Sans with unicode-math, I noticed that running lualatex on my document uses up enormous amounts of RAM. I have distilled my problem to a minimal ...
6
votes
1
answer
2k
views
Externalizing TikZ-Images takes very long
Introduction
Hello, I am facing very long compile times of more than 14 minutes for a ~130 page document, including around 40 PGF-Plots/TikZ-Images. Due to LaTeX's memory limits and (in fact) for ...
8
votes
1
answer
3k
views
How to speed up LuaLaTeX startup with fontspec?
As a novice user of lualatex and fontspec I've found it very slow (>1.3 seconds) to load on my Linux system:
% This is file compact.tex
\documentclass[a4paper]{article}
% This is needed only for old (...
14
votes
4
answers
778
views
What is the LaTeX equivalent of ConTeXt \testfeatureonce to benchmark performance
ConTeXt provides a macro \testfeatureonce to benchmark performance. The syntax is
\testfeatureonce{n}{...}
which runs the code in the second argument n times (n is assumed to be an integer) and ...
8
votes
1
answer
89
views
Using control sequence names to efficiently store a large amount of characters
When reading the thread about low-level arrays in TeX I stumbled over a note in Bruno Le Floch's answer:
A long string of characters is stored more efficiently as a csname than as a list of tokens....
3
votes
0
answers
214
views
Is it possible to keep TeX initial files (.sty, .cfg, .def) in memory in order to speed up each compilation?
I often use LaTeX to write documents and use TikZ/PGF to draw multi-page pictures.
However, one common issue (which has been discovered hundreds of times) is that even small change will take some ...
21
votes
1
answer
423
views
Speed of includegraphics seemingly dependent on how many packages are loaded!
Here is test file for (Plain) pdftex. To test it, you need some graphics file foo.pdf in working repertory. Mine is a copy of the file found via kpsewhich example-image-a.pdf. Call the following ...
25
votes
1
answer
7k
views
Why doesn't LaTeX compile faster?
Looking at what computers can do when it comes to presenting graphics (think games, graphical user interfaces, and so forth), it almost comes of as a surprise to me that I often have to wait for ...
2
votes
0
answers
265
views
What would be the most efficient way to insert image in a document?
In terms of occupied space and performance (compiling time), what would be the most efficient way to insert image in a document :
Insert images from different files (multiple .jpg, .png, etc.);
...
13
votes
1
answer
308
views
compiling pdftex 2.2 seconds with 2012 vs 29 seconds with 2018 version
I'm not quite sure where to start looking to fix this. I have recently migrated from an old Ubuntu 14.04 box using texlive/2012 to an 18.04 box running texlive-2018.
old box
pdfTeX 3.1415926-2.4-1....
0
votes
1
answer
628
views
Does splitting tex documents into multiple ones improve build performance
I've seen this mentioned often, for example, in several answers here. But I have my doubts. Do LaTeX engines (latex/pdflatex/xelatex/lualatex) do incremental compilation at all? Besides, even if they ...
37
votes
2
answers
8k
views
Is it possible to use GPU acceleration on compiling large LaTeX documents?
Surprisingly, I haven't found much information on this topic, except for Tips for choosing hardware for best LaTeX compile performance, which states that compilation time mostly depends on how high ...
2
votes
0
answers
1k
views
MiKTeX 2.9 - Compiling does take around 3 minutes
I'm using MiKTeX for around 2 years with a great template for my university (https://github.com/andygrunwald/FOM-LaTeX-Template).
The results are always great but the time it takes for me to compile ...
7
votes
0
answers
3k
views
TeX-engine in modern multicore processors [duplicate]
Could (La)TeX processing be made faster by better exploiting the modern multicore processors, such as incorporating multithreading into one of the existing tex-processors?
If so, is there any ongoing ...
10
votes
1
answer
1k
views
How is floating-point arithmetic implemented in TeX
The TeXbook says that TeX only uses fixed-point arithmetic/integer arithmetic with very small units (essentially the same thing for our purposes). Why do modern TeX variants not support floating point ...
13
votes
1
answer
896
views
Compilation Speed - texlive 2017 slower than 2015 - How to profile?
we're using a toolchain based on texlive 2015 and I made a try replacing it with the new released version of texlive 2017. As testobject I used or current document (~650 pages). I found out that a ...