[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kate] part/document: only call kateTextLine once: saves 75000 functions calls (in large files)
From: Dominik Haumann <dhdev () gmx ! de>
Date: 2012-07-02 13:33:30
Message-ID: 20120702133330.E59C8A60C6 () git ! kde ! org
[Download RAW message or body]
Git commit f0b0f4f707395e49d362a2b5bbc27118a9210d20 by Dominik Haumann.
Committed on 02/07/2012 at 14:33.
Pushed by dhaumann into branch 'master'.
only call kateTextLine once: saves 75000 functions calls (in large files)
M +3 -2 part/document/katedocument.cpp
http://commits.kde.org/kate/f0b0f4f707395e49d362a2b5bbc27118a9210d20
diff --git a/part/document/katedocument.cpp b/part/document/katedocument.cpp
index 266564b..653c149 100644
--- a/part/document/katedocument.cpp
+++ b/part/document/katedocument.cpp
@@ -3728,10 +3728,11 @@ bool KateDocument::findMatchingBracket( KTextEditor::Range& range, int maxLines
if (!cursor->move(searchDir))
return false;
- if (kateTextLine(cursor->line())->attribute(cursor->column()) == validAttr )
+ Kate::TextLine textLine = kateTextLine(cursor->line());
+ if (textLine->attribute(cursor->column()) == validAttr )
{
/* Check for match */
- QChar c = character(cursor->toCursor());
+ QChar c = textLine->at(cursor->column());
if( c == bracket ) {
nesting++;
} else if( c == opposite ) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic