Feature Request Tracker

ID:11 🔗
Status:Closed (Implemented)
Date:2013-05-23 05:01:32
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 opinion.


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.

Update 2013-05-26

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

Update 2013-06-17

Added a note in documentation of version 3.06.

Update 2020-02-29

The glossaries performance page compares the various build methods.


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.

Add comment or return to search results.

Watch This Report

If you would like to be notified whenever updates are made to this report, please fill in your email address in the box below and click on "Notify Me of Changes" button. (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 supply your name, it will be used in the email greeting, which provides a more personal message, otherwise you'll just get a generic greeting. If you have previously supplied your name when signing up for notifications, you don't need to resupply it unless you want to change it.

If you have previously subscribed to notifications for this report, you can unsubscribe by clicking on the "Stop Notification" button.

The "Confirm Topic ID" field helps to protect against spambots. Please enter the feature request ID (which you can find at the top of this page).

E mail:
Confirm E mail:
Confirm Topic ID:

To unsubscribe from all notifications use the notifications page.


You can append a comment to this report using the form below. Comments are checked first before being added. Any spam or offensive content will be removed first according to this site's Terms of Website Use. Please bear in mind that I develop and maintain free software in my spare time. If you want commerical level support then you can hire a TeX consultant.

The "Confirm Feature Request ID" field helps to protect against spambots. Please enter the feature request ID (which you can find at the top of this page).

(Optional. If provided, it will be shown with the comment.)
Confirm Feature Request ID:

You can use the following markup:

[pre]Displayed verbatim[/pre]
[tt]monospace text[/tt]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url]

Ordered list:
[li]first item[/li]
[li]second item[/li]

Unordered list:
[li]first item[/li]
[li]second item[/li]

Click on the Preview button to preview the message.

Return to search results.