Comment 22 for bug 513044

Revision history for this message
Max Kanat-Alexander (mkanat) wrote :

On my local machine ( Core2 Duo 2.66GHz ), here are the times to run pygmentize on a Perl file based on file size:

131K file: 1 second
261K: 2 seconds
391K: 2.8 seconds
521K: 3.8 seconds

In other words, about 1 second per 128K.

For a python file, I get these times:

115K: 0.697s
230K: 1.190s
345K: 1.773s

It continues to be linear--about 0.6 seconds for each 128K or so.

And that's on my local machine that's not really doing anything else.

So I'm guessing that 512K will be a reasonable limit for files that we syntax-highlight, and we'll put the limit in a constant in case people want to change it locally.