News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Really slow performance when deleting several lines

Started by skirby, July 05, 2006, 01:39:36 PM

Previous topic - Next topic

skirby

Hello,

Is it me or C::B is really slow when you try to delete more than 100 lines in the same time.
On my computer, Windows 2000 sp4 with P4 2.8 Ghz with 2Go RAM it takes about 5 seconds to delete 150 lines.
More the CPU is used up to 80%

For information, I use the last nightly build:
Version 1.0 revision 2676 ()   gcc 3.4.5 Windows/unicode

I have done some test with older version and it seems that slow down problems have appeared since the The 14 June 2006 build
With the 13 June 2006 build => No problem
Since the 14 June 2006 build => Slow down problem when deleting lines

I hope you could reproduce and correct this problem.

Otherwise, do I have to post this problem on BerliOS site?

Thanks and have a nice day.

thomas

Takes about half a second here (still way too much, though).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

mandrav

I can guess where it's coming from. Let me see...
Be patient!
This bug will be fixed soon...

thomas

I think it is coming from 2554 and 2557, both changes deal with updating breakpoints when lines are deleted.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

mandrav

Quote from: thomas on July 05, 2006, 01:51:48 PM
I think it is coming from 2554 and 2557, both changes deal with updating breakpoints when lines are deleted.

Yes, I know, thanks :)
Be patient!
This bug will be fixed soon...

MortenMacFly

#5
I knew that this would happen - these lines are from me. :oops:
Anyway: mandrav: That's why I have proposed a RemoveBreakpoints method because only the debugger knows how to effectively remove breakpoints beyond the new EOF if lines are deleted from a file...
I still have my implementation of this at home... an interest?
With regards, Morten.

Edit: BTW: I just realiased that the TODO on top of the affected lines made in in SVN, too... :lol:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

MortenMacFly

Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

mandrav

#7
Quote from: MortenMacFly on July 05, 2006, 02:08:16 PM
I knew that this would happen - these lines are from me. :oops:
Anyway: mandrav: That's why I have proposed a RemoveBreakpoints method because only the debugger knows how to effectively remove breakpoints beyond the new EOF if lines are deleted from a file...
I still have my implementation of this at home... an interest?

I 'm working on it, as we speak.
I have opted for another route: I added the following function in the debugger plugins' interface:

virtual void EditorLinesAddedOrRemoved(cbEditor* editor, int startline, int lines) = 0;


If you think about it, it's really up to the debugger to stay in sync with the editor. Not the editor's job to keep bugging the debugger to keep in sync ;)
Be patient!
This bug will be fixed soon...

MortenMacFly

Quote from: mandrav on July 05, 2006, 02:25:15 PM
If you think about it, it's really up to the debugger to stay in sync with the editor. Not the editor's job to keep bugging the debugger to keep in sync ;)
I fully agree on that. And in fact I had nearly the same arguments to the method, maybe the naming was bad. I assume you are still going to call this method from inside "cbEditor::OnEditorModified", right?! Anyway... we'll see as time passes by... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

mandrav

OK, fix commited.
Much more simpler code, a lot faster and hopefully fixes all problems the old implementation had.
Morten, I 'm waiting for your comments.
Be patient!
This bug will be fixed soon...

MortenMacFly

Quote from: mandrav on July 05, 2006, 08:39:51 PM
Morten, I 'm waiting for your comments.
mandrav, you are the man. Remember the list I posted here: http://forums.next.codeblocks.org/index.php?topic=3276.msg25945#msg25945? All the test cases that failed recently will now work just fine. I think this is another huge step towards RC3 because this was really annoying.
Well... no... very well... no... excellent done! :P
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

mandrav

Be patient!
This bug will be fixed soon...

skirby

Thank you very much for your hard work.

I really love C::B and it becomes better each day   :D