[Konsole-devel] konsole kpart

Robert Knight robertknight at gmail.com
Wed Oct 3 12:20:24 UTC 2007


> which does the same amout of printf() calls and
> has the same logic, consumes much more CPU (3,4,5% ).

If you are printing a lot of messages to the terminal then there will
be a certain overhead caused by the output processing and text
rendering.  I would expect the overhead to be very low unless you are
printing a very large number of messages.

What exactly are these messages in any case?

> Is this an issue related to overload caused by embedding Konsole in a KPart?
> Can i improve the performance of my Application?

Please don't try and guess where your application's performance
problems lie.  Use a profiling tool.  I recommend callgrind, which is
part of the valgrind suite.  kcachegrind can then be used to view and
analyse the results.  After installing valgrind, it can be used like
so:

valgrind --tool=calllgrind yourapplication 2> logfile.out

... use your application as normal for a short while and then close it ...

kcachegrind logfile.out

This will give you a much more detailed analysis of where your
application is spending its CPU cycles.  If it turns out that a lot of
time is being spent in the Konsole part then please post the callgrind
log to this list.  It might be too large to post as an attachment
however.

Regards,
Robert.

On 03/10/2007, Giacomo <delleceste at gmail.com> wrote:
> Good morning to all.
>
> I used to have a program running on the console (konsole) and now i am
> porting it to a Qt4 (KDE4) application.
> The part of the program which used to print out messages on the console,
> has been embedded in a Konsole KPart.
>
> The issue is that, while when it was a console application it used to consume
> a little percentage of the CPU (< 1% on the peaks of the printf() calls ),
> now the _same_ application, which does the same amout of printf() calls and
> has the same logic, consumes much more CPU (3,4,5% ).
>
> Is this an issue related to overload caused by embedding Konsole in a KPart?
> Can i improve the performance of my Application?
> Or is it a price to pay to embed a console application into a Konsole KPart?
> Or is it because i have a alpha version of KDE4?
>
>
>
> Thank you for any advice.
>
>
>
> --
> Giacomo S.
> http://www.giacomos.it
>
> - - - - - - - - - - - - - - - - - - - - - -
>
> IPFIREwall (http://www.giacomos.it/ipfire) viene presentato
> all'Universita` degli Studi di Udine, il 28 ottobre, in occasione del
> Linux Day 2006:
> http://iglu.cc.uniud.it/linuxday
>
> - - - - - - - - - - - - - - - - - - - - - -
>
>  . ''  `.
> :   :'    :
>  `.  ` '
>     `- Debian GNU/Linux -- The power of freedom
>         http://www.debian.org
> _______________________________________________
> konsole-devel mailing list
> konsole-devel at kde.org
> https://mail.kde.org/mailman/listinfo/konsole-devel
>



More information about the konsole-devel mailing list