vtraag / tikz-colorbrewer

Definition files providing colours as defined by the ColorBrewer project.
34 stars 7 forks source link

Library loading times are quite long #2

Open jdugge opened 10 years ago

jdugge commented 10 years ago

Using this library in an otherwise empty document increases the compilation time from ~1 s to ~4 s on my computer, which is understandable from the large number of lists, but also a bit painful, and its bound to get worse if my feature request #1 is implemented ;-).

Maybe the library could be split up into sublibraries, or the list definitions could be provided in separate files and the colormap and cycle list name keys patched to only load the definitions when required.

\documentclass{article}
\usepackage{pgfplots}
\usepgfplotslibrary{colorbrewer} % ~4 s to compile with this included, ~1 s to compile with this  commented out

\begin{document}
\end{document}
vtraag commented 10 years ago

Yes, that would indeed be good. Unfortunately, I have no idea how to load the definitions only when they are being used, so if you have a suggestion for doing so, that would be more than welcome! Otherwise, I could indeed make different files for all the different colorschemes for example, but I considerd that to be a bit of overkill. Perhaps at least splitting in the different types of colorschemes (for TikZ and different ones for the different PGF possibilities) might be an indea.