Re: Photo import problems using python



On Sat, 2010-01-30 at 13:56 -0600, Damon Lynch wrote:
>                 
>         
> After modifying my code to use gio commands like copy() and
> enumerate_children(), and hopefully thereby bypassing any potential
> FUSE issues, I've discovered that my problems still persist with my
> test hardware (a high end camera, the Canon 5D Mk II). So it seems the
> problem is not FUSE. These problems include the GUI locking up
> momentarily, and the download speed being approximately 1/5th that of
> downloading from a python test file (without a GUI) or from Nautilus.
> The very same code, when downloading from a memory card reader, has no
> problems.
> 
> Naturally this causes me to suspect that is there is a problem between
> the way my multi-threaded pygtk application is running, and the GVFS /
> GIO code that runs only when downloading from a device like a camera.
> There appears to be a real conflict of some sort, possibly relating to
> gtk and gobject. Does anyone have any suggestions about where I could
> look to track the problem down? After doing some googling, I tried
> experimenting by replacing a call to gtk.main() with
> gobject.MainLoop(), and gdk.threads_init()
> with gobject.threads_init(), but the problem still persists.  I don't
> know what to do now.

You could try the gvfs-copy (will use the gio ops, not fuse) command to
copy a file and see what kind of performance it gets. If thats still
slow then this seems to not be related to your code but rather some gvfs
internal issue.

How exactly are you doing the copy? Are you doing a sync or an async
copy? If sync, are you doing it in a thread? If you're doing a sync copy
on the main thread (i.e. the ui thread), then the kind of UI lockups
you're experiencing is expected.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl redhat com            alexander larsson gmail com 
He's an uncontrollable vegetarian master criminal with no name. She's a 
sharp-shooting goth stripper operating on the wrong side of the law. They 
fight crime! 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]