Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-03

IDE Messages window uses much CPU when building a project on Win32

10 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

cobines

Hello.

I'm experiencing a following issue on Windows XP. When building something with the IDE the compiler messages window flickers and lazarus process uses much CPU. For example messages window displaying 10 lines takes 30%, 30 lines 90% of CPU. I don't experience this on Linux/QT4; there lazarus process takes very little 1% of CPU while building, regardless of the size of messages window. On Win32 there must be some additional repaints issued by the widgetset or maybe by the OS.

I already ran IDE with settings from Linux and it didn't help. I have to resize the messages window so that no lines are visible to have full CPU for compiling.

Does someone else experience this as well?

cobines

Reply by email

Graeme Geldenhuys
to cobines
cobines wrote
I'm experiencing a following issue on Windows XP. When building something with the IDE the compiler messages window flickers and lazarus process uses much CPU.

I can confirm the excessive flicker of the Message window when building a project (been seeing this for a while now). I didn't check the CPU load though. I am using latest Lazarus Trunk under Win2000.

Regards, ? - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email

Alexander Klenin
to Graeme Geldenhuys
Graeme Geldenhuys wrote 9 lines
On 28 March 2012 07:58, cobines <cobines at ....> wrote: > I'm experiencing a following issue on Windows XP. When building > something with the IDE the compiler messages window flickers and > lazarus process uses much CPU. I can confirm the excessive flicker of the Message window when building a project (been seeing this for a while now). I didn't check the CPU load though. I am using latest Lazarus Trunk under Win2000.

The flicker bothers me as well, Win7, trunk.

Alexander S. Klenin

Reply by email

Alexander Klenin
to cobines
cobines wrote
2012/3/28 Alexander Klenin : > The flicker bothers me as well, Win7, trunk. Does it also affect CPU usage?

Not sure -- one core is maxed out,
but whether it is by compiler (as it should be) or by IDE -- I did not check.

Alexander S. Klenin

Reply by email

cobines
to cobines: Hello. I'm experiencing a following issue on Windows XP. When building something with the…

The output filter that processes compiler output often issues empty BeginUpdate/EndUpdate sequences without actually making any updates. It also updates very often, usually 15 times per second, so it constantly switches in and out of update mode and that causes the whole treeview to be repainted very often. For me personally adding new lines once per second would be enough and progress is not needed at all.

I think it can be changed so that Begin/EndUpdate are only called when actually there is something to update. Plus an option could be added to disable displaying progress line.

cobines

Reply by email

cobines
to cobines

I posted a patch for the excessive Begin/EndUpdate. http://bugs.freepascal.org/view.php?id=21600

From my tests disabling displaying progress has almost no impact on

CPU usage, so I'm not doing anything with it.

However I found that the quick fix icons that are updated from timer or OnIdle while building amount to half of CPU usage, so I would like to add an option to disable them. I have only found option to disable the note/hint/warning icons.
Is it enough to only disable displaying the icons or would I need to disable some functionality as well, like the "Hide message via directive" menu? I don't use this feature so I don't know if icons are indispensable for it to work.

cobines

Reply by email

Juha Manninen
to cobines
cobines wrote
I posted a patch for the excessive Begin/EndUpdate. http://bugs.freepascal.org/view.php?id=21600

I applied this one, too. It looks good although I didn't measure how much time it saves during build.

Show quoted text 12 lines
>From my tests disabling displaying progress has almost no impact on CPU usage, so I'm not doing anything with it. However I found that the quick fix icons that are updated from timer or OnIdle while building amount to half of CPU usage, so I would like to add an option to disable them. I have only found option to disable the note/hint/warning icons. Is it enough to only disable displaying the icons or would I need to disable some functionality as well, like the "Hide message via directive" menu? I don't use this feature so I don't know if icons are indispensable for it to work.

Maybe the option used for other icons could also be used for quick fix icons. (?)
I don't know anything about these icons. Someone else should comment on this one.

Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120330/513dcb13/attachment.html>

Reply by email

Mattias Gaertner
to Juha Manninen
Show quoted text 28 lines
On Fri, Mar 30, 2012 at 4:48 AM, cobines wrote: > I posted a patch for the excessive Begin/EndUpdate. > http://bugs.freepascal.org/view.php?id=21600 > I applied this one, too. It looks good although I didn't measure how much time it saves during build. > >From my tests disabling displaying progress has almost no impact on > CPU usage, so I'm not doing anything with it. > > However I found that the quick fix icons that are updated from timer > or OnIdle while building amount to half of CPU usage, so I would like > to add an option to disable them. I have only found option to disable > the note/hint/warning icons. > Is it enough to only disable displaying the icons or would I need to > disable some functionality as well, like the "Hide message via > directive" menu? I don't use this feature so I don't know if icons are > indispensable for it to work. > Maybe the option used for other icons could also be used for quick fix icons. (?) I don't know anything about these icons. Someone else should comment on this one.

I removed the indicator icon. Almost all messages have nowadays a quickfix.

Mattias

Reply by email

cobines
to Mattias Gaertner

2012/3/30 Mattias Gaertner :

I removed the indicator icon. Almost all messages have nowadays a quickfix.

OK. Thanks.

With these few changes today now CPU stays mostly at 0-1% during build even with a big messages window open.

But on Win32 it still flickers when changes are made to the treeview. Can double buffering be enabled for the treeview?

cobines

Reply by email