[Konsole-devel] konsole kpart

Giacomo delleceste at gmail.com
Wed Oct 3 12:57:27 UTC 2007


Well, my application is named "ipfire".

If i launch it as

./ipfire

in a console, it goes fast (low CPU usage).

if i do

konsole_part->startProgram("./ipfire");

inside a KApplication and a KonsolePart, it runs much slower.

Thank you very much!

Giacomo


2007/10/3, Robert Knight <robertknight at gmail.com>:
> > This is the reason why i was wondering why such a greater usage of
> > CPU when i switched to a KonsolePart.
>
> Let me clarify, are you saying that you have two separate applications
> here (one the console application and one the GUI application with an
> embedded Konsole part)?  If so, are you saying the console app is
> running slower or the GUI app is running slower?
>
> Regards,
> Robert.
>
> On 03/10/2007, Giacomo <delleceste at gmail.com> wrote:
> > 2007/10/3, Robert Knight <robertknight at gmail.com>:
> > > > 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.
> >
> > Yes there is a lot of messages to print out on the console, but this application
> > has not been changed when embedded into a KonsolePart.
> > This is the reason why i was wondering why such a greater usage of CPU when
> > i switched to a KonsolePart.
> > I mean, the application i monitor on the konsole KPart is the same i ran into
> > a console Konsole alone, i.e. the same executable started with
> >
> > konsole_part->startProgram("program_name");
> >
> > Thank you anyway,
> >
> > Giacomo
> >
> >
> > >
> > > 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
> > > >
> > > _______________________________________________
> > > konsole-devel mailing list
> > > konsole-devel at kde.org
> > > https://mail.kde.org/mailman/listinfo/konsole-devel
> > >
> >
> >
> > --
> > 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
> >
> _______________________________________________
> konsole-devel mailing list
> konsole-devel at kde.org
> https://mail.kde.org/mailman/listinfo/konsole-devel
>


-- 
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



More information about the konsole-devel mailing list