On Sun, 24 Jan 2010 01:28:03 +0100 Sam Hocevar <s...@hocevar.net> wrote: > Package: python-pygments > Version: 1.2.2+dfsg-1 > Severity: important > > pygments seems to be extremely slow when the input file contains a lot > of colour changes. Here are the timings on my box with both pygmentize > and highlight (from the highlight package) with the attached file (2000 > lines of C code): > > % time pygmentize ugly.h >/dev/null > 5.98s user 0.02s system 99% cpu 6.034 total > % time pygmentize -f html ugly.h >/dev/null > 6.30s user 0.04s system 100% cpu 6.348 total > > % time highlight -A ugly.h >/dev/null > 0.64s user 0.00s system 99% cpu 0.645 total > % time highlight ugly.h >/dev/null > 0.64s user 0.01s system 100% cpu 0.647 total
i've tried this again while uploading pygments/2.7.1: $ time pygmentize ~/Downloads/ugly.h 2>&1 1>/dev/null real 0m2.244s user 0m2.125s sys 0m0.125s $ time highlight ~/Downloads/ugly.h 2>&1 1>/dev/null real 0m0.638s user 0m0.587s sys 0m0.055s but, i dont really think it's fair to compare the performances of a compiled program (highlight) with the one of an interpreted one (pygmentize). i think this 4x time is expected and "okay" given it's python code. Sam, is there something else you'd want us to do here? Regards, Sandro