Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
slow performance with Pygments? #483
Is particularly slow performance on HTML generated by Pygments to be expected, even on relatively small files? On Ubuntu 14.04 with WeasyPrint 0.39 (and, to be fair, an older Cairo and Pango), we're currently seeing the following if we try to syntax-highlight, e.g.,
But is 46 seconds (inside a Docker container on a recent Mac Pro) indeed to be expected for a 294-line syntax-highlighted file? We've experimented with a few Weasy and Pygments options, but none seem to boost performance noticeably. Runtime seems to increase noticeably, though, as soon as the input fills more than 1 page of the PDF.
Sample inputs at https://gist.github.com/dmalan/9519e730b207e524bc6165966a492acf, and sample output at https://github.com/Kozea/WeasyPrint/files/1120994/fonts.pdf.
Runtime aside, everything is rendering quite nicely. Thank you!