Smile for the Camera: a new cybercrime short story ebook.

Feature Tracker RSS feed

I’m currently working on a major new version of the datatool package. This may take a while. Please be patient. (Experimental version available for testing.)

ID 11🔗
Date: 2013-05-23 05:01:32
Status Closed (Implemented)
Category glossaries
Summary The package is very slow

Sign in to subscribe to notifications about this report.

Description

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.

MWE

No mwe.tex

Evaluation

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.

Comments

1 comment.

🔗Comment from anonymous
Date: 2013-05-26 00:00:00

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.

Replying to Comment #8:

Name (optional):

Are you human? Please confirm the feature request ID (which can be found at the top of this page) or login if you have an account.

Comment:


You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

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

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

You can use the Preview button to review your message formatting before submitting.


Add Comment

Name (optional):

Are you human? Please confirm the feature request ID (which can be found at the top of this page) or login if you have an account.

Comment:


You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

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

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

You can use the Preview button to review your message formatting before submitting.

Page permalink: https://www.dickimaw-books.com/featuretracker.php?key=11