[Gambas-user] strange thing! or not?

Benoit Minisini gambas at ...1...
Sun Aug 27 12:17:05 CEST 2006


On Saturday 26 August 2006 23:46, Stefano Palmeri wrote:
> Hi, all. Hi, Benoit.
>
> Working on a project that has some "SHELL ... TO", I noticed
> that after compiling it slows down.
>
> I did some tests and found this strange thing: the same
> code runs 4-5 times faster if it is in a console project
> than in a QT project, after compiling of course.
> My stupid question is: is it normal?
>
> I tested on a 900MHz machine, so on a faster computer
> you may need to increase the loops in the code to notice the difference.
>
> I've attached the two test examples that give me so different timing
> result after compiling.
> Please, compile them and run both from a console.
>
> Gambas2 version is 1.9.39.
>
> Regards,
>
> Stefano Palmeri

I changed your examples to loop 1000 times instead of 100, and I redirected 
the output to /dev/null so that the time to write to the terminal is the same 
in the two cases.

I get these results:

console: ~ 7.6 s
QT:      ~ 9.3 s

So it is very strange! 

Because if you use SHELL ... TO, then the event loop is not called, i.e. no 
specific QT code is execute. Theoretically, the same code is run in the two 
cases!

More investigation is needed there...

Regards,

-- 
Benoit Minisini





More information about the User mailing list