[Bug 61317] Gideon burns a lot of cpu cycles

gp at iws.it gp at iws.it
Tue Jul 22 21:12:04 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=61317     




------- Additional Comments From gp at iws.it  2003-07-22 21:11 -------
It seems to me that in the java parser spends a lot of cpu cycles trying to parse 
non-java source files. I noticed that if I try to edit a non java file, while a java project is 
open, gideon starts to eat cpu cycles. I reproduced the problem in this way.  
 
- Open a java project. 
- Open a non java source (I tried with an xml one) 
- Open a java source 
 
I think the cause is elsewhere, however to avoid the problem I did an ugly hack 
adding a  couple of lines to the file parts/javasupport/problemreporter.cpp 
in the method ProblemReporter::reparse() (see below). 
 
Hope this helps in some way. 
 
Thanks, 
  
 
--- kdevelop/parts/javasupport/problemreporter.cpp      2003-05-26 
15:38:56.000000000 +0200 
+++ kdevelop-20030722/parts/javasupport/problemreporter.cpp     2003-07-22 
19:52:50.000000000 +0200 
@@ -167,12 +167,14 @@ 
     if( !m_javaSupport->isValid() ) 
        return; 
 
+    if (strstr(m_filename,".java") == NULL) 
+        return; 
 
     m_timer->stop(); 
 
     kdDebug(9007) << "ProblemReporter::reparse()" << endl; 
     m_javaSupport->backgroundParser()->addFile( m_filename ); 
-    kdDebug(9007) << "---> file added" << endl; 
+    kdDebug(9007) << "---> file added " << m_filename << endl; 
 }




More information about the KDevelop-devel mailing list