[gtkada] Slowness on Linux

Charles Darcy charlie at mullum.com.au
Fri Oct 19 19:24:12 CEST 2001


On Thu, 2001-10-18 at 22:32, manuel.op.de.coul at eon-benelux.com wrote:
> 
> Hi,
> 
> I've compiled my application on a new pc with Redhat
> Linux 7.1. It works, but the graphical actions are
> tremendously slow. 


	I had a similar problem when I introduced a package which used tasking
into my program. The GUI slowed down so much that I could watch each
widget drawn in turn. The problem was solved in my case by using the
alternative GNAT run-time system 'rts-native'.

	If you are using tasks, perhaps you might try changing the GNAT
run-time system from 'rts-fsu' to 'rts-native'. Below is an extract from
the README.TASKING file (from the GNAT distribution), which describes
how to do this.


cheers,

Charlie.


-------------------------
-- from README.TASKING --
-------------------------

This README contains information relevant to tasking on the following
systems:
Sparc Solaris, x86 Linux, HP-UX, PowerPC AIX and SGI IRIX.

The 'adainclude' subdirectory containing the sources of the GNAT runtime
is
located along with the 'adalib' subdirectory containing the ALI files
and the static and/or shared GNAT library in the gcc target dependent
area:
     target=$prefix/lib/gcc-lib/`gcc -dumpmachine`/`gcc -dumpversion`/

On some machines (Solaris Sparc, Linux, HP-UX, AIX), 2 different run
times are
delivered with the standard binary release.

On Solaris, Linux and AIX, the run times are called 'rts-native' and
'rts-fsu'.
On HP-UX, they are called 'rts-dce' and 'rts-pthread'.

rts-native  offers a binding to the native thread package.
rts-fsu     offers a binding to the FSU threads which provide full Annex
D
            semantics.
rts-dce     offers a binding to the HP-UX 10.20 DCE thread package.
rts-pthread offers a binding to the HP-UX 11.00 POSIX pthread package.
Note
            that this run time will only work with HP-UX 11.00, even if
it is
            always distributed and installed.

Those 2 run times are installed in the target dependant area and contain
a
complete source and binary subdirectory. See a detailled description
below
to help you choosing between the two different run times.

The default run time (when installing GNAT) is as follows:
rts-native for Solaris and AIX
rts-fsu for Linux
rts-dce for HP-UX

This default run time is selected by the means of soft links. For
example on
Solaris and AIX:

 $(target-dir)
     |
     +--- adainclude----------+
     |                        |
     +--- adalib-----------+  |
     |                     |  |
     +--- rts-native       |  |
     |    |                |  |
     |    +--- adainclude <---+
     |    |                |
     |    +--- adalib <----+
     |
     +--- rts-fsu
          |
          +--- adainclude
          |
          +--- adalib


If the other runtime is to be selected on a permanent basis, these soft
links
can be modified with the following commands:

    $ cd $target
    $ rm -f adainclude adalib
    $ ln -s rts-fsu/adainclude adainclude
    $ ln -s rts-fsu/adalib adalib

Alternatively, you can specify 'rts-fsu/adainclude' in the file
$target/ada_source_path and 'rts-fsu/adalib' in $target/ada_object_path.
Please refer to the GNAT User's Guide for more information about these
files.

If the other run time is to be selected temporarily, this can be
achieved by regular GNAT object or source path selection, either by
setting the environment variables:

    $ ADA_INCLUDE_PATH=$target/rts-fsu/adainclude:$ADA_INCLUDE_PATH
    $ ADA_OBJECTS_PATH=$target/rts-fsu/adalib:$ADA_OBJECTS_PATH
    $ export ADA_INCLUDE_PATH ADA_OBJECTS_PATH

or by using -aI$target/rts-fsu/adainclude 
        and -aO$target/rts-fsu/adalib
on the gnatmake command line. 

You can similarly switch to rts-native on Linux and rts-pthread on HP-UX
11.00.
	





More information about the gtkada mailing list