nanogui: Thread: Fl::add_timeout dramatically slows system responsiveness in static linked embedded nano-x apps


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Fl::add_timeout dramatically slows system responsiveness in static linked embedded nano-x apps
From: Luca Santini ####@####.####
Date: 6 Nov 2009 08:54:11 -0000
Message-Id: <4AF3E306.2070408@spesonline.com>

Hi all,
i noticed this phenomenon and i hope this can help someone.

I work on embedded systems (ARM and SH archs) with single non-window-managed FLTK applications.
I noticed that system speed grows up if i compile nano-X as a library (no more need to launch the server)
but if in my apps there are some Fl::add_timeout/Fl::repeat_timeout/Fl::remove_timeout the performance degrades and system is quite unusable.

Solution is: using threads.

Fl::add_timeout -> pthread_create
Fl::repeat_timeout -> while(1) with usleep() in the thread
Fl::remove_timeout -> pthread_cancel

regards,
L.

-- 
*Luca  Santini*
//Elettronica di Sistema//

*SPES. S.c.p.a*
Via  Lamberto Corsi, 43   
60044 Fabriano (AN)
tel. +39 0732 25291 diretto 0732 25451
fax +39 0732 2529441
####@####.#### ####@####.####
www.spesonline.com <http://www.spesonline.com>
[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.