Free Software
Recent news (2017-03-24): texosquery v1.2 released.

Feature Request Tracker

ID 11
Status Closed (Implemented)
Category glossaries
Summary The package is very slow


Compiling my current document, which uses glossaries for the symbol handling and contains about 1300 calls of the \gls macro (but also graphics and the usual content), takes about 33 s on my computer. When inserting \def\gls#1{a}, the document compiles in less than 6 s.

The glossaries package is very useful and has a lot of features. Nevertheless, I was a bit shocked, learning, that TeX is busy only with handling the glossary entries. With the above numbers, TeX needs more than 60 millions of CPU cycles to execute one call of \gls.

Although TeX is not the fastest language, this sounds unreasonable and I guess that an improvement of one order of magnitude is possible. This would lead to a compile time of the mentioned document of less than 9 s, which would be reasonable in my oppinion.

Comment 2013-05-26

sorry for delivering such a fuzzy feature request. I found the root cause, but as I cannot answer using the feature request tracker, I answer this way.

Glossaries is so slow in my use case, as I had to use the "savewrites" option. Without this option, my document normally does not compile. However, there is the quite new "scrwfile" package, which globally saves write registers, using a slightly different approach. Loading this package and deactivating the "savewrites" option speeds up glossaries by more than one magnitude (roughly factor 30).

Due to the "scrwfile" package, which probably did not exist when you implemented the "savewrites" option, I do not think there is a reason for new users to use the "savewrites" option anymore (at least not as a default). Thus, I think it would help some users, if you could add a comment to the glossaries documentation to the description of the "savewrites" option and recommend the "scrwfile" package due to its performance benefit.

Thanks for you great work.


You haven't suggested how to make that improvement of one order of magnitude. If you have an idea how to do it, feel free to share it.

The glossaries package does indeed have a lot of features, and there's a lot of code in the background needed to accommodate all those features. The choice is to have a powerful package with slow compilation or a very basic package with fast compilation, or for even faster compilation don't use any packages at all and just use plain TeX.

Edit 2013-05-26

Thank you for the information about the "scrwfile" package. I'll add a note in the documentation.

Edit 2013-06-17

Added a note in documentation of version 3.06.

Watch This Request

If you would like to be notified whenever updates are made to this feature request, please fill in your email address in the box below and click on "Notify Me of Changes". (Please ensure the address is valid.) Your details won't be passed on to third parties in line with this site's Privacy Policy.


If you would like to add a comment regarding this feature request, please fill in the form below, but don't use it for a different bug or feature request, even if it's related. Instead fill out a new bug report or feature request.

Name (Optional)

I'm sorry, some spammers have cracked the captcha, so here's an extra test to check if you're human.
Please enter the ID number of this report in the confirm key box below the captcha.

Confirm key:

Note: the free software provided here (including my class files and packages on CTAN) are funded by my book sales. While I'm keen to improve my code, book production has to take priority, so please don't expect a rapid response.

© 2012 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Site Map FAQs