Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: CodeEditor, Assist++, Topic++ » A little proposal on code analysis
Re: A little proposal on code analysis [message #21263 is a reply to message #21259] Mon, 11 May 2009 10:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Another possibile reason of lag:

In ide/idewin.cpp, GUI_APP_MAIN comment out

ActivateUsrLog();

Mirek
Re: A little proposal on code analysis [message #21291 is a reply to message #21263] Tue, 12 May 2009 07:59 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Yesterday I compiled TheIde and I must say I also experience lags during typing. Maybe not so huge but still. My configuration is: AthlonX2 2Ghz 2GB Vista
Re: A little proposal on code analysis [message #21292 is a reply to message #21291] Tue, 12 May 2009 08:08 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
unodgs wrote on Tue, 12 May 2009 01:59

Yesterday I compiled TheIde and I must say I also experience lags during typing. Maybe not so huge but still. My configuration is: AthlonX2 2Ghz 2GB Vista


Even with all patches? Sad... Smile

Mirek
Re: A little proposal on code analysis [message #21293 is a reply to message #21263] Tue, 12 May 2009 08:28 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

luzr wrote on Mon, 11 May 2009 12:19

Another possibile reason of lag:

In ide/idewin.cpp, GUI_APP_MAIN comment out

ActivateUsrLog();

Mirek

Sorry, but bug is still there. But IMO it (lag) became smaller.
I also noticed that lag heavily depends on overall size and size of dependencies for ALL included and opened files, especially for the current one.
Turning off any applications and opening only one small .h file with only one CtrlLib.h/CtrlLib.h included, made bug almost disappear.
Re: A little proposal on code analysis [message #21294 is a reply to message #21293] Tue, 12 May 2009 08:46 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Tue, 12 May 2009 02:28

luzr wrote on Mon, 11 May 2009 12:19

Another possibile reason of lag:

In ide/idewin.cpp, GUI_APP_MAIN comment out

ActivateUsrLog();

Mirek

Sorry, but bug is still there. But IMO it (lag) became smaller.
I also noticed that lag heavily depends on overall size and size of dependencies for ALL included and opened files, especially for the current one.
Turning off any applications and opening only one small .h file with only one CtrlLib.h/CtrlLib.h included, made bug almost disappear.


OK.

First, one more possibility (but given what you wrote above, unlikely):

void Ide::Periodic()
{
//	CheckFileUpdate();
	SetIcon();
	if(debugger && debugger->IsFinished() && !IdeIsDebugLock())
		IdeEndDebug();
}


EDIT: Before bothering, try the patch below...

Second, we should decide if it is size of file or size of project or both.

Analyzing the code, I see no reason of influence of size of project (in fact, I believe that one was there and was fixed in the very first patch...).

Maybe you could try again plain CodeEditor and paste some very long file into it?

Thanks.

Mirek

[Updated on: Tue, 12 May 2009 09:08]

Report message to a moderator

Re: A little proposal on code analysis [message #21296 is a reply to message #21294] Tue, 12 May 2009 09:07 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
OK, what about this:

Quote:


void WorkspaceWork::TouchFile(const String& path)
{
if(!showtime)
return;
Time tm = GetSysTime();
String n = GetFileName(path);
for(int i = 0; i < filelist.GetCount(); i++) {
FileList::File f = filelist[i];
if(f.name == n && path == SourcePath(GetActivePackage(), f.name))
filelist.Set(i, f.name, f.icon, f.font, f.ink, false, 0,
Null, SColorMark, Null, Null, Null, SColorMark);
}
}



(problem fixed here would cause lag if you are in package with a lot of files...)

Mirek
Re: A little proposal on code analysis [message #21297 is a reply to message #21294] Tue, 12 May 2009 09:23 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Tried both patches (one w/o another) - and no success eliminating lag.

For now, I do always have a lag (it seems like OS restart is needed). But whan I succeeded in decreasing the lag, it was a strong dependency on amount of opened files and their size. One opened small file could possibly make lag smaller. It needs more thorough testing which I can make only in short periods (sorry, detached duty in 2 days - have to finish many things for now).
Re: A little proposal on code analysis [message #21298 is a reply to message #21297] Tue, 12 May 2009 09:53 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Tue, 12 May 2009 03:23

Tried both patches (one w/o another) - and no success eliminating lag.

For now, I do always have a lag (it seems like OS restart is needed). But whan I succeeded in decreasing the lag, it was a strong dependency on amount of opened files and their size. One opened small file could possibly make lag smaller. It needs more thorough testing which I can make only in short periods (sorry, detached duty in 2 days - have to finish many things for now).


OK, let me know if you have any new results...

Maybe Daniel can test meanwhile?

I have to say, I do not see any lag on my slow testing machine now...

Mirek
Re: A little proposal on code analysis [message #21299 is a reply to message #21298] Tue, 12 May 2009 10:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
OK, another attempt, this time more complex, so it is svn revision 1161. Fingers crossed...

I hope this is finally "it" Smile

Mirek
icon14.gif  Re: A little proposal on code analysis [message #21305 is a reply to message #21299] Tue, 12 May 2009 15:06 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

You did it. Lag is fixed. Thanks a lot!
Re: A little proposal on code analysis [message #21307 is a reply to message #21305] Tue, 12 May 2009 15:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Tue, 12 May 2009 09:06

You did it. Lag is fixed. Thanks a lot!


Uffffffffffffffffffffff.......... Smile

Mirek
Re: A little proposal on code analysis [message #21310 is a reply to message #21041] Tue, 12 May 2009 15:53 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
Any summary what went wrong? Smile
I'm curious and would love to learn more about it, although I don't want to check the code. Very Happy
Re: A little proposal on code analysis [message #21311 is a reply to message #21307] Tue, 12 May 2009 15:53 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Great job! TheIDE looks like even works faster (I mean, even quicker responsive to any actions). That is really cool!
Re: A little proposal on code analysis [message #21312 is a reply to message #21310] Tue, 12 May 2009 16:56 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mr_ped wrote on Tue, 12 May 2009 09:53

Any summary what went wrong? Smile
I'm curious and would love to learn more about it, although I don't want to check the code. Very Happy


Well, it turned out that problem was that many things were checking package files each for each Key event.

The bottleneck what the code to get the path of package - that involves scanning filesystem (PackagePath function). I have fixed the problem by adding a cache there.

Mirek
Re: A little proposal on code analysis [message #21314 is a reply to message #21307] Tue, 12 May 2009 19:23 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

luzr wrote on Tue, 12 May 2009 09:09

Mindtraveller wrote on Tue, 12 May 2009 09:06

You did it. Lag is fixed. Thanks a lot!


Uffffffffffffffffffffff.......... Smile

Mirek

The patch works perfect for me too! Thanks!
Re: A little proposal on code analysis [message #21320 is a reply to message #21314] Wed, 13 May 2009 04:34 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Yes, problem solved!

Thank You!
Re: A little proposal on code analysis [message #26800 is a reply to message #21320] Fri, 28 May 2010 15:52 Go to previous message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Mirek, I have bad news. The bug is again there.

PC: Pentium 4 CPU 2.8 GHz, 512 MB RAM
OS: WinXP SP2
PROJECT: 17 packages

The same project under home PC (Intel 2.5 GHz) is edited flawlessly, without TheIDE lags.

[Updated on: Fri, 28 May 2010 15:52]

Report message to a moderator

Previous Topic: Parser error sensitivity
Next Topic: Code assist default selection
Goto Forum:
  


Current Time: Thu Mar 28 21:51:27 CET 2024

Total time taken to generate the page: 0.01470 seconds