5

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 longtblr environments faster?

Are there some constructions that make those environments particularly slow and that are better avoided?

Creating the tables once as graphics to be included is not really an option because the contents of the tables may change while the document is revised.

  • 3
    you can keep the tables as separate documents in the project and re-run them on edit so including them as pdf seems a viable option. (the other option is probably pay to get longer timelimit) – David Carlisle Oct 08 '21 at 16:33
  • 1
    Another option is to store the table in a separate project, then share the output of the project into your main document project. You'll need to "Refresh" the file in the main project when it changes in the separate project though. This may or may not be an acceptable trade-off for you. The approach is similar to what could be done for large TikZ/pgfplots graphics: https://www.overleaf.com/learn/latex/Questions/I_have_a_lot_of_tikz%2C_matlab2tikz_or_pgfplots_figures%2C_so_I%27m_getting_a_compilation_timeout._Can_I_externalise_my_figures%3F#Generating_the_drawings_in_a_separate_project – Paul Gessler Oct 08 '21 at 19:44
  • (remark) Unfortunately, despite the nice features, tabularray is quite slow for larger tables (on my machine, 400 table entries take 4-5 seconds) – user202729 Nov 28 '21 at 05:54
  • I am experiencing serious lag issues with tabularray too. None of my tables have more than 6 or 7 rows and columns, but there are quite a few of these, resulting in a build time of well over 2 minutes (and frequent things going wrong with @writefile that simply seem to be caused by the amount of time it is taking to build). I've no choice but to revert to tabular as it is becoming unworkable. – rbrignall Apr 12 '22 at 15:27
  • @DavidCarlisle can you explain step by step what you mean by your comment? Maybe post it as an answer? – Toivo Säwén Sep 26 '23 at 16:13
  • @ToivoSäwén if you make a separate document with just a table you get a pdf that you can include with \includegraphics so you can do each table as a separate run and apply the overleaf time limit to each table separately not to all of them in one run. (but tabularray is very slow and even a reasonably small table might run out of time – David Carlisle Sep 26 '23 at 16:20
  • @DavidCarlisle OK, that seems like it would take way too long to setup in a way creates a consistent style and formatting for the tables. – Toivo Säwén Sep 26 '23 at 16:53
  • @ToivoSäwén well you always have the option of paying Overleaf to get more time. It's a commercial not a technical problem that you have. – David Carlisle Sep 26 '23 at 16:58
  • @DavidCarlisle The cost is one thing, but spending minutes on end to compile every time you change a small thing in your file adds up. But I digress... hopefully tabularray will receive further optimisation in the future. – Toivo Säwén Sep 26 '23 at 17:01
  • You could give up on tabularray and use the excellent table packages longtable, tabularx, tabulary, ... written by somebody or other:-) – David Carlisle Sep 26 '23 at 17:06
  • Well, we wanted to use tabullarray for a purpose (better PDF display of black lines in tables with grey cells). And we had the best possible commercial access to overleaf at the time of writing this document. We succeeded with the approach sketched in my self-answer. – Sir Cornflakes Sep 26 '23 at 17:44

2 Answers2

2

Are there some possibilities to make tabularray's tblr and longtblr environments faster? Are there some constructions that make those environments particularly slow and that are better avoided?

  1. Don't use X columns, since they cause tabularray to measure all cells for another time.
  2. Don't use multicolumn cells, since they cause tabularray to measure all cells for another time.
L.J.R.
  • 10,932
  • 3
    but X columns and multicolumns are precisely the reason people use tabu and are forced to tabularray now, whose slowness compared to tabu is utterly ridiculous for technical documents – mirabilos May 25 '23 at 00:23
  • For anyone curious about replacing X columns, you can use e.g. Q[t,wd=0.1\textwidth] to replicate them with a set width (replace 0.1\textwidth with the relevant column width) – Toivo Säwén Sep 26 '23 at 16:25
1

We deal with Overleaf time limits currently by splitting the whole document in subfiles (using the so-named package, and bibunits in addition) and compiling the whole document locally. This allows the distributed contributors to work on their respective parts and keeping an eye on the whole document at the same time.