Hi, I mean Konsole KDE3.x.<br>Tomorrow i will try the same program inside the Konsole provided by KDE4<br>and will let you know.<br><br>Thank you and good night.<br><br>2007/10/3, Robert Knight <<a href="mailto:robertknight@gmail.com">
robertknight@gmail.com</a>>:<br>> > inside a KApplication and a KonsolePart, it runs much slower.<br>> <br>> When you are running the application in a console, do you mean<br>> Konsole/KDE 4? or a different terminal program?
<br>> <br>> Regards,<br>> Robert.<br>> <br>> On 03/10/2007, Giacomo <<a href="mailto:delleceste@gmail.com">delleceste@gmail.com</a>> wrote:<br>> > Well, my application is named "ipfire".
<br>> ><br>> > If i launch it as<br>> ><br>> > ./ipfire<br>> ><br>> > in a console, it goes fast (low CPU usage).<br>> ><br>> > if i do<br>> ><br>> > konsole_part->startProgram("./ipfire");
<br>> ><br>> > inside a KApplication and a KonsolePart, it runs much slower.<br>> ><br>> > Thank you very much!<br>> ><br>> > Giacomo<br>> ><br>> ><br>> > 2007/10/3, Robert Knight <
<a href="mailto:robertknight@gmail.com">robertknight@gmail.com</a>>:<br>> > > > This is the reason why i was wondering why such a greater usage of<br>> > > > CPU when i switched to a KonsolePart.
<br>> > ><br>> > > Let me clarify, are you saying that you have two separate applications<br>> > > here (one the console application and one the GUI application with an<br>> > > embedded Konsole part)?  If so, are you saying the console app is
<br>> > > running slower or the GUI app is running slower?<br>> > ><br>> > > Regards,<br>> > > Robert.<br>> > ><br>> > > On 03/10/2007, Giacomo <<a href="mailto:delleceste@gmail.com">
delleceste@gmail.com</a>> wrote:<br>> > > > 2007/10/3, Robert Knight <<a href="mailto:robertknight@gmail.com">robertknight@gmail.com</a>>:<br>> > > > > > which does the same amout of printf() calls and
<br>> > > > > > has the same logic, consumes much more CPU (3,4,5% ).<br>> > > > ><br>> > > > > If you are printing a lot of messages to the terminal then there will<br>> > > > > be a certain overhead caused by the output processing and text
<br>> > > > > rendering.  I would expect the overhead to be very low unless you are<br>> > > > > printing a very large number of messages.<br>> > > ><br>> > > > Yes there is a lot of messages to print out on the console, but this application
<br>> > > > has not been changed when embedded into a KonsolePart.<br>> > > > This is the reason why i was wondering why such a greater usage of CPU when<br>> > > > i switched to a KonsolePart.
<br>> > > > I mean, the application i monitor on the konsole KPart is the same i ran into<br>> > > > a console Konsole alone, i.e. the same executable started with<br>> > > ><br>> > > > konsole_part->startProgram("program_name");
<br>> > > ><br>> > > > Thank you anyway,<br>> > > ><br>> > > > Giacomo<br>> > > ><br>> > > ><br>> > > > ><br>> > > > > What exactly are these messages in any case?
<br>> > > > ><br>> > > > > > Is this an issue related to overload caused by embedding Konsole in a KPart?<br>> > > > > > Can i improve the performance of my Application?<br>
> > > > ><br>> > > > > Please don't try and guess where your application's performance<br>> > > > > problems lie.  Use a profiling tool.  I recommend callgrind, which is
<br>> > > > > part of the valgrind suite.  kcachegrind can then be used to view and<br>> > > > > analyse the results.  After installing valgrind, it can be used like<br>> > > > > so:
<br>> > > > ><br>> > > > > valgrind --tool=calllgrind yourapplication 2> logfile.out<br>> > > > ><br>> > > > > ... use your application as normal for a short while and then close it ...
<br>> > > > ><br>> > > > > kcachegrind logfile.out<br>> > > > ><br>> > > > > This will give you a much more detailed analysis of where your<br>> > > > > application is spending its CPU cycles.  If it turns out that a lot of
<br>> > > > > time is being spent in the Konsole part then please post the callgrind<br>> > > > > log to this list.  It might be too large to post as an attachment<br>> > > > > however.
<br>> > > > ><br>> > > > > Regards,<br>> > > > > Robert.<br>> > > > ><br>> > > > > On 03/10/2007, Giacomo <<a href="mailto:delleceste@gmail.com">
delleceste@gmail.com</a>> wrote:<br>> > > > > > Good morning to all.<br>> > > > > ><br>> > > > > > I used to have a program running on the console (konsole) and now i am
<br>> > > > > > porting it to a Qt4 (KDE4) application.<br>> > > > > > The part of the program which used to print out messages on the console,<br>> > > > > > has been embedded in a Konsole KPart.
<br>> > > > > ><br>> > > > > > The issue is that, while when it was a console application it used to consume<br>> > > > > > a little percentage of the CPU (< 1% on the peaks of the printf() calls ),
<br>> > > > > > now the _same_ application, which does the same amout of printf() calls and<br>> > > > > > has the same logic, consumes much more CPU (3,4,5% ).<br>> > > > > >
<br>> > > > > > Is this an issue related to overload caused by embedding Konsole in a KPart?<br>> > > > > > Can i improve the performance of my Application?<br>> > > > > > Or is it a price to pay to embed a console application into a Konsole KPart?
<br>> > > > > > Or is it because i have a alpha version of KDE4?<br>> > > > > ><br>> > > > > ><br>> > > > > ><br>> > > > > > Thank you for any advice.
<br>> > > > > ><br>> > > > > ><br>> > > > > ><br>> > > > > > --<br>> > > > > > Giacomo S.<br>> > > > > > <a href="http://www.giacomos.it">
http://www.giacomos.it</a><br>> > > > > ><br>> > > > > > - - - - - - - - - - - - - - - - - - - - - -<br>> > > > > ><br>> > > > > > IPFIREwall (<a href="http://www.giacomos.it/ipfire">
http://www.giacomos.it/ipfire</a>) viene presentato<br>> > > > > > all'Universita` degli Studi di Udine, il 28 ottobre, in occasione del<br>> > > > > > Linux Day 2006:<br>> > > > > > 
<a href="http://iglu.cc.uniud.it/linuxday">http://iglu.cc.uniud.it/linuxday</a><br>> > > > > ><br>> > > > > > - - - - - - - - - - - - - - - - - - - - - -<br>> > > > > >
<br>> > > > > >  . ''  `.<br>> > > > > > :   :'    :<br>> > > > > >  `.  ` '<br>> > > > > >     `- Debian GNU/Linux -- The power of freedom
<br>> > > > > >         <a href="http://www.debian.org">http://www.debian.org</a><br>> > > > > > _______________________________________________<br>> > > > > > konsole-devel mailing list
<br>> > > > > > <a href="mailto:konsole-devel@kde.org">konsole-devel@kde.org</a><br>> > > > > > <a href="https://mail.kde.org/mailman/listinfo/konsole-devel">https://mail.kde.org/mailman/listinfo/konsole-devel
</a><br>> > > > > ><br>> > > > > _______________________________________________<br>> > > > > konsole-devel mailing list<br>> > > > > <a href="mailto:konsole-devel@kde.org">
konsole-devel@kde.org</a><br>> > > > > <a href="https://mail.kde.org/mailman/listinfo/konsole-devel">https://mail.kde.org/mailman/listinfo/konsole-devel</a><br>> > > > ><br>> > > >
<br>> > > ><br>> > > > --<br>> > > > Giacomo S.<br>> > > > <a href="http://www.giacomos.it">http://www.giacomos.it</a><br>> > > ><br>> > > > - - - - - - - - - - - - - - - - - - - - - -
<br>> > > ><br>> > > > IPFIREwall (<a href="http://www.giacomos.it/ipfire">http://www.giacomos.it/ipfire</a>) viene presentato<br>> > > > all'Universita` degli Studi di Udine, il 28 ottobre, in occasione del
<br>> > > > Linux Day 2006:<br>> > > > <a href="http://iglu.cc.uniud.it/linuxday">http://iglu.cc.uniud.it/linuxday</a><br>> > > ><br>> > > > - - - - - - - - - - - - - - - - - - - - - -
<br>> > > ><br>> > > >  . ''  `.<br>> > > > :   :'    :<br>> > > >  `.  ` '<br>> > > >     `- Debian GNU/Linux -- The power of freedom<br>> > > >         
<a href="http://www.debian.org">http://www.debian.org</a><br>> > > > _______________________________________________<br>> > > > konsole-devel mailing list<br>> > > > <a href="mailto:konsole-devel@kde.org">
konsole-devel@kde.org</a><br>> > > > <a href="https://mail.kde.org/mailman/listinfo/konsole-devel">https://mail.kde.org/mailman/listinfo/konsole-devel</a><br>> > > ><br>> > > _______________________________________________
<br>> > > konsole-devel mailing list<br>> > > <a href="mailto:konsole-devel@kde.org">konsole-devel@kde.org</a><br>> > > <a href="https://mail.kde.org/mailman/listinfo/konsole-devel">https://mail.kde.org/mailman/listinfo/konsole-devel
</a><br>> > ><br>> ><br>> ><br>> > --<br>> > Giacomo S.<br>> > <a href="http://www.giacomos.it">http://www.giacomos.it</a><br>> ><br>> > - - - - - - - - - - - - - - - - - - - - - -
<br>> ><br>> > IPFIREwall (<a href="http://www.giacomos.it/ipfire">http://www.giacomos.it/ipfire</a>) viene presentato<br>> > all'Universita` degli Studi di Udine, il 28 ottobre, in occasione del<br>
> > Linux Day 2006:<br>> > <a href="http://iglu.cc.uniud.it/linuxday">http://iglu.cc.uniud.it/linuxday</a><br>> ><br>> > - - - - - - - - - - - - - - - - - - - - - -<br>> ><br>> >  . ''  `.
<br>> > :   :'    :<br>> >  `.  ` '<br>> >     `- Debian GNU/Linux -- The power of freedom<br>> >         <a href="http://www.debian.org">http://www.debian.org</a><br>> > _______________________________________________
<br>> > konsole-devel mailing list<br>> > <a href="mailto:konsole-devel@kde.org">konsole-devel@kde.org</a><br>> > <a href="https://mail.kde.org/mailman/listinfo/konsole-devel">https://mail.kde.org/mailman/listinfo/konsole-devel
</a><br>> ><br>> _______________________________________________<br>> konsole-devel mailing list<br>> <a href="mailto:konsole-devel@kde.org">konsole-devel@kde.org</a><br>> <a href="https://mail.kde.org/mailman/listinfo/konsole-devel">
https://mail.kde.org/mailman/listinfo/konsole-devel</a><br>> <br><br><br>-- <br>Giacomo S.<br><a href="http://www.giacomos.it">http://www.giacomos.it</a><br><br>- - - - - - - - - - - - - - - - - - - - - -<br><br>IPFIREwall (
<a href="http://www.giacomos.it/ipfire">http://www.giacomos.it/ipfire</a>) viene presentato <br>all'Universita` degli Studi di Udine, il 28 ottobre, in occasione del<br>Linux Day 2006:<br><a href="http://iglu.cc.uniud.it/linuxday">
http://iglu.cc.uniud.it/linuxday</a><br><br>- - - - - - - - - - - - - - - - - - - - - -<br><br>. ''  `.<br>:   :'    :<br>`.  ` '<br>    `- Debian GNU/Linux -- The power of freedom<br>        <a href="http://www.debian.org">
http://www.debian.org</a><br>