Hi everyone!
When I use GeSHi with smaller code snippets, everything works fine (great work btw.). But when I start using longer Code (about 700 lines), the entire node won't show up (header, footer, blocks etc. are all fine, just no content).
Did I maybe miss some option like "maximum code length" or is this a bug?

Comments

enkore’s picture

Version: 7.x-1.0-beta1 » 7.x-1.0
soxofaan’s picture

There is certainly a limit, but it depends on the available memory of your PHP setup, version of used GeSHi library, complexity of the source code/language to render, ... Nearly impossible to pin point a hard number.

Does highlighting work if you split your code block in two parts of, say, 350 lines?

enkore’s picture

It stops highlighting at around 500 lines, independent of the code language or complexity. It is already enough to copy and paste 800 lines of void main(); ...
Well, anyways I'll write a small module to watch the memory usage.

(fakeedit): If PHP is going low on memory, wouldn't it then abort the script execution resulting in a blank page? When I have a node with too long code, then just the content area is blank while all other areas (including comments and everything below the content) are rendered normally... strange

enkore’s picture

The memory limit is not the reason. I got more than 60 % free memory... script execution time is it neither, since the page loads as fast as all other pages.

yukare’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

There are two setting about pcre in php, improve both, you will be able to process bigger codes, but anyway always will be a limit about the size of the code taht geshi is able to process.