On 7/25/05, Johan Dahlin <[EMAIL PROTECTED]> wrote: > So, if you have a 20M file and you're doing 4k requests, > gnome-vfs is going to have a queue of about 5120 read requests, which > will end up in 5120 read() calls and 5120 calls to your read_cb. > > It'd probably be a lot more efficient to read more than 4K at a time, and > not put so high load on the communication between the threads inside > gnome-vfs.
Maybe, but I let GNOMEVFS determine the most efficient method to reading files using its file_info.io_block_size property. I understand this may vary for different architectures or filesystems, so I don't want to fiddle with that. >Are the asynchronous callbacks in gnome-vfs called from > the same thread? > If read_cb is called from another thread you'll have problems inserting > data into the text buffer. I believe the asynchronous callbacks are from the same thread. > You can also experiment in waiting for the result before sending more read > requests, so you keep the queues in gnome-vfs smaller. How do I accomplish this? Thanks _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
