diff options
Diffstat (limited to 'Source/NoodleLineNumberView.m')
-rw-r--r-- | Source/NoodleLineNumberView.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/NoodleLineNumberView.m b/Source/NoodleLineNumberView.m index a4383102..1c5e8281 100644 --- a/Source/NoodleLineNumberView.m +++ b/Source/NoodleLineNumberView.m @@ -240,6 +240,14 @@ text = [view string]; stringLength = [text length]; + // Switch off line numbering if text larger than 6MB + // for performance reasons. + // TODO improve performance maybe via threading + if(stringLength>6000000) + { + NSLog(@"Line Numbering switched off. Text length larger than 6MB."); + return; + } [lineIndices release]; lineIndices = [[NSMutableArray alloc] init]; |