For quite some time I have been working on a paper for which TeXmacs was a lifesaver. I could not manage to focus and bear everything in mind while editing LaTeX. The proofs were too technical and the issues with them were creaping up much quicker than I could fix them. Thanks to TeXmacs I managed to finish my paper and post it [2205.09851] The full range of uniform bounds for the bilinear Hilbert transform (arxiv.org).
I recently took up the paper back up to implement some fixes to typos, formatting, and exposition that I have found myself, and colleagues have helpfully pointed out. Next I will be submitting it to a journal.
You might remember me asking often for advice on how to make TeXmacs not be unbearably slow. I have since written a smaller paper in TeXmacs where I did not encounter significant slowdowns. But now that I have opened this paper again the situation is quite dire. I checked performance both under Windows and the current snapshot (2.1.2-svn13888) and it is almost unworkable. The bench debug benchmark gives an average of
TeXmacs] std-bench, Task 'typeset' took 96 ms
My laptop is quite powerful:
Processor: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz, 2592 Mhz, 6 Core(s), 12 `` Installed Physical Memory (RAM) 16.0 GB
I wanted to open this post both because I do not want to yet submit a “generic” bug saying “performance is bad” and to gather practical advice on how to deal with slowdowns because of long papers. I am attaching the files to this post and below I’ll review some things I did that partially helped.
Apparently page splitting is very computationally costly. Switching to papyrus mode definitely helped but only because with page splitting things were even worse.
When actively writing the paper I actually separated the document into multiple files. However I got confused and clearly did this incorrectly. Referencing from one file to equations from another did not work. Counters started from 0 for every section. I have some macros defined in the preamble. I had to replicate them manually into the preamble of each file.
Could someone explain or link to an explanation of how to split a large file into multiple ones correctly? It would be best if this were to work well with export to LaTeX. When I was exporting to LaTeX I needed to first create a copy, then “expand all inclusions” and then export to LaTeX. Otherwise it was a mess that required a lengthy adjustment in LaTeX.
I use tables to align pieces of multiline equations. Surely this may contribute to the slow down but I don’t think it is the main culprit. TeXmacs is slow even with simpler typeset equations
I noticed that even in smaller papers the
itemize tag brings TeXmacs to a crawl. Creating a new list item by pressing enter usually takes around 1-2 seconds of frozen editor even when the whole file is at most 10-20 pages (not 100 as the paper at hand). I found that the behavior is worst when the itemize list is inside a math environment (
Editing the authors of the title of a file that is even 10-20 pages long is very slow. It takes around 0.5-1sec per keystroke. The only way I found for editing the title is writing the title somewhere else and copying and pasting it into the correct destination.
Am I doing something wrong? Did I misconfigure my editor? Am I abusing syntax in some way? Any tips are deeply appreciated.
How to reproduce
ubht.tm. Go to
Proposition 3.4 with label
prop:outer-restricted-interpolation. Maybe enable benchmarking.
Try editing the bulleted list: adding a new list item takes 900ms
Try editing the math (somewhat long equations) at the end of the proof of that Proposition. The input is very sluggish.
tried it again after restarting TeXmacs: the latency for the itemized list is still around 900ms. The latency for editing the equation is better: towards 20ms with occasional spikes to 85ms. Better but still suboptimal. Generally, TeXmacs slows down with time.
Forgot the attachments: however, I cannot add them here. Could you enable upload of
.tmfiles. The forum tells me it only accepts images!!
The mailing list also did not accept an email with the attachments. The only place I found to post them is by opening a bug report here: GNU TeXmacs - Bugs: bug #62891, Slow editing of large papers [Savannah]