OSDN Git Service
(root)
/
tortoisegit
/
TortoiseGitJp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
5736e32
)
Fixed issue #209: High CPU usage in tortoiseproc.exe
author
Frank Li
<lznuaa@gmail.com>
Wed, 21 Oct 2009 16:01:42 +0000
(
00:01
+0800)
committer
Frank Li
<lznuaa@gmail.com>
Wed, 21 Oct 2009 16:01:42 +0000
(
00:01
+0800)
Limit max ProgressDlg log is 500 lines
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/ProgressDlg.cpp
patch
|
blob
|
history
diff --git
a/src/TortoiseProc/ProgressDlg.cpp
b/src/TortoiseProc/ProgressDlg.cpp
index
b1fc50f
..
248d9dd
100644
(file)
--- a/
src/TortoiseProc/ProgressDlg.cpp
+++ b/
src/TortoiseProc/ProgressDlg.cpp
@@
-274,6
+274,17
@@
void CProgressDlg::ParserCmdOutput(TCHAR ch)
\r
CString text;
\r
m_Log.GetWindowTextW(text);
\r
+ int count=0;
\r
+ for( int i=0;i<text.GetLength();i++)
\r
+ {
\r
+ if(text[i]==_T('\n'))
\r
+ count++;
\r
+ }
\r
+ if(count > 500)
\r
+ {
\r
+ int start=text.Find(_T('\n'),0);
\r
+ text = text.Mid(start+1);
\r
+ }
\r
if(ch == _T('\r'))
\r
{
\r
RemoveLastLine(text);
\r