I ran into issues with my host when parsing content of about 29 kbytes. The server bids farewell with a 500 error.
The problem arises with a regex and preg_replace in function parse_non_string_part() near line 3454 of geshi.php (version 188.8.131.52). I suggest not to parse the whole $stuff_to_parse at once but split in at \n and apply preg_replace line-wise. This way the content could be veeeeery large without getting into problems with any limitations. (preg_* function may handle about 100 k bytes only (Google says)).
I've changed the code near line 3450 in geshi.php to the following which solved the problem with my host. An item that previously forced a 500 is now parsed properly: