Import is slow

32 views
Skip to first unread message

Jean-Baptiste BUTET

unread,
Jan 27, 2013, 3:38:51 PM1/27/13
to pydc...@googlegroups.com
Salut all, 

Je travaille a a fireFly cam, under raspberry pi.

pyd394 works great, as I expected !!

J's a really ggod job, thanks for it.

Just a thing : when I launche save-image.py, in examples, I found it sloooooow to begin.

Je done some trys : 
Question  in the imports : 
importer système 0,0002281665802
pydc1394 1.69143390656
importer l'image 0,0281460285187

Vous saw that importing pydc1394 takes more than half a second... to do this : 
à partir pydc1394 importation, DC1394Library caméra

Estt something normal ?

Merci

JB


Jean-Baptiste BUTET

unread,
Jan 27, 2013, 3:48:15 PM1/27/13
to pydc...@googlegroups.com
OK..... thanks (or not.........) google traduction...

I'm working on FireFly Cam under raspberry pi.

Pydc1394 works as I exepcted, it's a really great job. Thanks for it !

Moreover, I have some latences when launching save-image.py in examples directory : 
-> imporst are slow.
So i've done bench (thanks time() :) ) :
import sys 0.000244140625
pydc1394 1.7108259201
import image 0.0283110141754

importing dc1394 takes more than one second and half... ouch.

I don't know if its really normal...

Mail you soon :)

JB

Holger Rapp

unread,
Jan 28, 2013, 2:47:05 AM1/28/13
to pydc...@googlegroups.com
Hi,

I do not know why import is slow. You could profile it to find out (using cProfile). I think it could be because the rasperry pi is pretty slow itself. But also the module is a ctypes module which needs to be interpreted and that is searching on many places for the C library - seems strange that it is that slow though.

If startup time is a problem, why not keep your program running and snap a picture on some event - e.g. a UNIX signal or a network packet?

Holger
Reply all
Reply to author
Forward
0 new messages