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
4 votes
0 answers
113 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
61 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,524
1 vote
1 answer
51 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 \...
  • 499
4 votes
0 answers
596 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 ...
  • 141
2 votes
0 answers
47 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
71 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?
  • 101
8 votes
2 answers
850 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 ...
2 votes
0 answers
291 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 ...
  • 3,539
4 votes
2 answers
571 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
122 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
104 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 ...
  • 153
3 votes
2 answers
183 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},...
  • 7,380
1 vote
1 answer
78 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 ...
  • 7,380
0 votes
0 answers
134 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 ...
  • 153
2 votes
0 answers
91 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 ...
  • 7,380
0 votes
0 answers
406 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 ...
  • 12.6k
19 votes
3 answers
32k 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
1k 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 ...
  • 4,630
1 vote
1 answer
86 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 ...
  • 1,246
2 votes
1 answer
108 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 ...
  • 1,246
1 vote
2 answers
250 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
198 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 ...
4 votes
0 answers
264 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 ...
  • 131
6 votes
1 answer
420 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 ...
  • 3,686
5 votes
2 answers
283 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?
  • 3,686
0 votes
0 answers
124 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
673 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 ...
6 votes
2 answers
981 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?
  • 1,971
5 votes
2 answers
272 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 ...
  • 13.1k
0 votes
0 answers
112 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 ...
  • 3,578
5 votes
0 answers
233 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 ...
  • 1,629
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 ...
  • 161
7 votes
1 answer
2k 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 (...
  • 1,063
14 votes
4 answers
736 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 ...
  • 61.8k
8 votes
1 answer
86 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....
  • 13.1k
3 votes
0 answers
183 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 ...
  • 368
21 votes
1 answer
402 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
24 votes
1 answer
6k 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 ...
  • 4,967
1 vote
0 answers
166 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.); ...
  • 11
13 votes
1 answer
302 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
391 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 ...
  • 1,519
35 votes
2 answers
7k 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,615
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 ...
  • 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 ...
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
877 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 ...
  • 553
5 votes
0 answers
307 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 ...
  • 1,634
14 votes
2 answers
10k 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
4 votes
0 answers
1k views

How to make LuaLateX faster? [closed]

There have been several ideas to improve the speed of PDFLaTeX. Script to automate externalizing TikZ graphics Ultrafast PDFLaTeX with precompiling and many more... Which additional tricks improve ...
  • 8,419
2 votes
2 answers
2k views

How to build with multiple cores in Ubuntu 16.04 and TexStudio?

I would like to speed up the building of my latex documents, and I'm curious if it's possible to use all four of my processor cores when building documents. There are instructions for windows users, ...