1. Georg Brandl
  2. pygments-main
  3. Issues
Issue #806 invalid

Support a cache mode

Marc Schlaich
created an issue

Pygmentizing a lot of files is considerably slow. A popular issue of this fact is the compilation time of LaTeX documents with minted ([[http://tex.stackexchange.com/questions/20178/speeding-up-minted-compilation|ref1]], [[http://code.google.com/p/minted/issues/detail?id=60|ref2]]).

I like the idea in these threads to cache generated convertions. So my proposal is to directly embed this into pygments. My idea is to add a commandline argument: {{{pygmentize --cache=.pyg_cache...}}}.

If you accept this proposal you can assign it to me :-)

Comments (7)

  1. Tim Hatch

    Interesting idea. Have you considered using a makefile that regenerates the changed file in much the same manner? Or are you using pygments in some other fashion (in the api, in rst, etc)?

  2. Marc Schlaich reporter

    As already mentioned this should be for LaTeX compilation, especially for the minted package.

    Of course there are multiple ways to achieve this, but I think pygments itself is the easiest entry point for this functionality. And there might be some other use cases, too.

  3. Log in to comment