Re: Pixbuf loading question
- From: Paul Davis <paul linuxaudiosystems com>
- To: nico <nbd free fr>
- Cc: gtk-list gnome org
- Subject: Re: Pixbuf loading question
- Date: Mon, 07 Apr 2008 09:31:46 -0400
On Mon, 2008-04-07 at 15:23 +0200, nico wrote:
> Hello
> I m developing an application using pygtk under ubuntu.
>
> For creation of thumbnails on an image list ( inside a gtk.Treeview), I
> create a pixbuf for each thumbnail.
>
> After power up of my laptop , I load the program and my 500 images (
> image loading is made on background) , for the creation of pixbuf, I
> can see many disc access to load the pixbuf ( I use the command
> pixbuf_new_from_file ).
>
> Then if I quit the application, and reload the program, The load time is
> very short, and I can no more notice disc access. It's like my pixbufs
> stays in memory, and gtk application did not need to reload from file.
> It's very useful for loading time but I don't understand why and how
> the buffers "stays in memory"
>
> How it is possible to force my application to start with the same
> behavior as the first launch ( many disc accces), without rebooting my
> laptop each time (;-() . I need that to optimize the loading of the
> pixbuf on background.
it is the operating system that does this for you, not GTK.
the only way i know that you can stop this is to run something before
your application that starts up which will completely clear what is
called the "buffer cache". there are a number of ways of doing this. one
can be to run a grep across the whole filesystem. another is a small
program that allocates more and more memory until it fails.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]