Skip to main content

Questions tagged [performance]

{performance} is for all matters related to improving compilation speed, memory usage or code length of the various parts of documents

Filter by
Sorted by
Tagged with
3 votes
1 answer
275 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 ...
amonakov's user avatar
  • 1,002
1 vote
0 answers
66 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} \...
mhj67163's user avatar
5 votes
0 answers
289 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 ...
João Lourenço's user avatar
1 vote
0 answers
314 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 -...
user32882's user avatar
  • 1,594
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 \...
LeafGlowPath's user avatar
8 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 ...
Ma Joad's user avatar
  • 191
2 votes
0 answers
49 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 (...
newAccountLatexImages's user avatar
2 votes
0 answers
136 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?
cento18's user avatar
  • 201
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 ...
Kwan Shaoh-yu's user avatar
3 votes
0 answers
472 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 ...
ivo Welch's user avatar
  • 3,798
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 ...
Sir Cornflakes's user avatar
0 votes
1 answer
259 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 ...
SampleTime's user avatar
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 ...
Gherman's user avatar
  • 153
3 votes
2 answers
206 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},...
Jinwen's user avatar
  • 8,598
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 ...
Jinwen's user avatar
  • 8,598
0 votes
0 answers
146 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 ...
Gherman's user avatar
  • 153
2 votes
0 answers
106 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 ...
Jinwen's user avatar
  • 8,598
0 votes
0 answers
534 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 ...
MadyYuvi's user avatar
  • 13.9k
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?
Harry's user avatar
  • 938
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 ...
vy32's user avatar
  • 4,810
1 vote
1 answer
108 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 ...
codepoet's user avatar
  • 1,316
2 votes
1 answer
112 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 ...
codepoet's user avatar
  • 1,316
2 votes
2 answers
323 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 ...
Patrick Ferguson's user avatar
0 votes
0 answers
249 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 ...
Razin Abid's user avatar
5 votes
0 answers
322 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 ...
oibaFox's user avatar
  • 163
6 votes
1 answer
492 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 ...
bp2017's user avatar
  • 3,786
5 votes
2 answers
350 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?
bp2017's user avatar
  • 3,786
0 votes
0 answers
181 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 ...
maksylon's user avatar
20 votes
2 answers
785 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 ...
Phelype Oleinik's user avatar
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?
latexforti's user avatar
  • 2,111
5 votes
2 answers
324 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 ...
siracusa's user avatar
  • 13.5k
0 votes
0 answers
164 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 ...
Dave's user avatar
  • 3,768
5 votes
0 answers
263 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 ...
Socob's user avatar
  • 1,703
5 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 ...
DPF's user avatar
  • 161
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 (...
pts's user avatar
  • 1,103
14 votes
4 answers
773 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 ...
Aditya's user avatar
  • 62.6k
8 votes
1 answer
88 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....
siracusa's user avatar
  • 13.5k
3 votes
0 answers
210 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 ...
Hansimov's user avatar
  • 378
21 votes
1 answer
419 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 ...
user avatar
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 ...
Speldosa's user avatar
  • 5,077
1 vote
0 answers
252 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.); ...
Dridri's user avatar
  • 11
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....
patrickdavey's user avatar
0 votes
1 answer
596 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 ...
Siyuan Ren's user avatar
  • 1,529
36 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 ...
andselisk's user avatar
  • 2,675
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 ...
Axel 's user avatar
  • 21
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 ...
João Lourenço's user avatar
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 ...
Blaisorblade's user avatar
13 votes
1 answer
892 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 ...
aronadaal's user avatar
  • 553
5 votes
0 answers
338 views

Selectively compiling source in LuaLaTeX

I have recently switched from Xe(La)TeX to Lua(La)TeX 1.0.4 (TeX Live 2017) in order to use font expansion feature of microtype package. As a result, my compilation time increased dramatically. I ...
Rafal's user avatar
  • 1,704
13 votes
2 answers
12k views

Faster way to compile a document [duplicate]

Writing a long document, compilation with Texmaker becomes too slow, so when I want to see how it looks, I loose time (not too much, but it is getting worse because of document's size). Is there any ...
user avatar