[Gambas-user] Major Performance impact
Benoit Minisini
gambas at ...1...
Mon Aug 27 22:14:39 CEST 2007
On lundi 27 août 2007, Harvey, Lewis (Contractor) wrote:
> We have a Gambas/Qt application which we have developed on the SUSE
> platform.
>
> We are trying to automate our testing of this application with Squish
> and Froglogic test automation product for Linux.
>
> The problem is when we are trying to record the script we get a major
> performance impact in delays in the application. But without Squish the
> application runs fine. We've received the following from the Froglogic
> guys:
>
> This is from just trying to get it to work initially:
>
> I just got a Gambas example (TreeView) working with the
> soon-to-be-released Squish 3.2.2. But I expect it to work with 3.2.1,
> too, as the main problem was a special setup consideration:
>
> While Gambas executables are binary files they are technically still
> Unix scripts as they start with the magic "#!" sequence. The script will
> be executed by the gbx interpreter:
>
> $ file TreeView
> TreeView: a /usr/bin/gbx -x script text
>
> So while the Gambas program (TreeView in this example) is supposed to be
> set as the AUT there'll be another executable (/usr/bin/gbx in my case)
> will be started internally. gbx still isn't a Qt application but from
> what I understand it dynamically loads some modules that are linked
> against the dynamic Qt library.
>
> To let Squish know about this three steps need to be performed:
>
> 1.) Squish needs to be configured to use the same Qt library as used
> by
> the Gambas modules. The correct one can be retrieved via e.g.:
>
> $ ldd /.../gambas/lib/gambas/lib.gb.qt.ext.so | grep libqt
> libqt-mt.so.3 => /home/porten/qt-3.3.3/lib/libqt-mt.so.3
>
> 2.) Check the "Hook into Sub-Processes" option under Test
> Suite|Settings
> 3.) Add gbx to the list of registered AUTs:
>
> squishserver --config addAUT gbx /usr/bin
>
> Step 3 can also be performed via the IDE (Test Suite|Settings) by
> setting /usr/bin/gbx as an AUT temporarily. Care just has to be taken to
> set back the AUT selection to the application again.
>
> I was able to record & replay interactions on all the control elements
> of the example. You should be able to do the same. If not, please let us
> know.
> AND also when discussing the Performance issue:
>
> Didn't see any negative effect with Gambas 1. In general, we've never
> received any report that recording would slow down the app in any
> noticeable way.
>
> I can only assume that either Gambas itself or your application does
> something special with the GUI event loop (for networking, process
> control or so) that causes a conflict with Squish.
>
>
>
> Note we are able to get the example programs to work without a problem
> but it's our GUI app that is having the issue.
>
>
>
> So if anyone knows of anything that could cause assist please let me
> know.
>
>
>
> Thank you,
>
> Lewis Harvey
> Test Automation Consultant
> RIS - Pizza Hut
> (972) 338-6715 - Office
> (972) 743-9683 - Cell
>
It's hard to guess, without knowing how Squish works.
Maybe you should know that by default, the interpreter forks before loading QT
or KDE libraries, because in the past these libraries didn't like being
dynamically loaded after the main startup. And so the solution was setting
the ld.so environment variables and forking, so that the libraries are loaded
before.
But now, it seems that the problem was solved in the libraries, and that the
preloading is not necessary anymore.
This could cause a problem to the Squish application.
So try to run your application by passing the "-p" flag to the interpreter to
disable shared libraries preloading.
Maybe it will help? I don't think so, but at the moment, I cannot say more.
Regards,
--
Benoit Minisini
More information about the User
mailing list