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
2 answers
282 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 ...
user avatar
2 votes
0 answers
136 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 ...
user avatar
  • 3,261
3 votes
2 answers
270 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 ...
user avatar
0 votes
1 answer
81 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 ...
user avatar
0 votes
0 answers
76 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 ...
user avatar
  • 153
3 votes
2 answers
168 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},...
user avatar
  • 4,515
1 vote
1 answer
76 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 ...
user avatar
  • 4,515
0 votes
0 answers
116 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 ...
user avatar
  • 153
2 votes
0 answers
75 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 ...
user avatar
  • 4,515
0 votes
0 answers
305 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 ...
user avatar
  • 10.9k
15 votes
3 answers
24k 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?
user avatar
6 votes
2 answers
928 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 ...
user avatar
  • 4,420
1 vote
1 answer
68 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 ...
user avatar
  • 1,228
2 votes
1 answer
105 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 ...
user avatar
  • 1,228
1 vote
2 answers
203 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 ...
user avatar
0 votes
0 answers
154 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 ...
user avatar
3 votes
0 answers
209 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 ...
user avatar
  • 121
6 votes
1 answer
342 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 ...
user avatar
  • 3,616
4 votes
2 answers
201 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?
user avatar
  • 3,616
0 votes
0 answers
75 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 ...
user avatar
20 votes
2 answers
542 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 ...
user avatar
5 votes
2 answers
553 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?
user avatar
  • 1,921
5 votes
2 answers
223 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 ...
user avatar
  • 12.8k
0 votes
0 answers
79 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 ...
user avatar
  • 3,448
5 votes
0 answers
182 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 ...
user avatar
  • 1,527
4 votes
1 answer
1k 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 ...
user avatar
  • 151
5 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 (...
user avatar
  • 1,023
14 votes
4 answers
700 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 ...
user avatar
  • 60.9k
8 votes
1 answer
85 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....
user avatar
  • 12.8k
3 votes
0 answers
152 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 ...
user avatar
  • 348
21 votes
1 answer
380 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
5k 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 ...
user avatar
  • 4,807
1 vote
0 answers
132 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.); ...
user avatar
  • 11
13 votes
1 answer
301 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....
user avatar
0 votes
1 answer
306 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 ...
user avatar
  • 1,509
33 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 ...
user avatar
  • 2,535
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 ...
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 ...
user avatar
10 votes
1 answer
985 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 ...
user avatar
13 votes
1 answer
856 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 ...
user avatar
  • 543
5 votes
0 answers
300 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 ...
user avatar
  • 1,624
14 votes
2 answers
9k 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
3 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 ...
user avatar
  • 8,019
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, ...
user avatar
2 votes
0 answers
233 views

Processing multiple files effectively XeLaTeX

I need to effectively compile many .tex files to .pdf. As far as I know, LaTeX (so XeLaTeX too) takes a lot of time for loading itself to memory, but a compilation process is fast. Now I have a ...
user avatar
  • 51
1 vote
0 answers
1k views

Texpad lagging/running slow for no reason

I'm running the newest texpad version 1.7.38 on the newest macbook pro with macOS Sierra 10.12.10. Lately it started to perform slow, it specially seems to lag (there is a delay of 0.3-0.5 s between ...
user avatar
  • 199
6 votes
1 answer
294 views

Can I downsize lua tables generated by luaotfload?

luatex loads a lot of otf fonts at every luaLaTeX run with my custom class (Minion Pro, Myriad Pro, Minion Math, Latin Modern Mono, Latin Modern Math, XITS). This is an extract taken from my custom ...
user avatar
  • 9,468
1 vote
1 answer
214 views

animated plot axis label werid moving

When I use the animate package the axis labels start to dance and bounce as the scale moves, how do I stop this from happening? Also: How do I make the animation smoother? Increasing the framerate ...
user avatar
  • 1,951
11 votes
1 answer
698 views

Performance difference between different graphics formats in pdflatex

I have a very complex document with many pictures (jpg, png and pdf). In trying to improve compiling performance I tried to convert all pictures to jpg, then all pictures to png and then to pdf (with ...
user avatar
  • 111
5 votes
3 answers
1k views

Custom format file and subfiles

I want to use a custom format file to speed up my compilation. However this doesn't play together with the subfiles package. Consider the following minimal example: preamble.tex \documentclass[...
user avatar
  • 27.8k