Hi Emmanuele,

Thanks for the reply.
Please help us with the following.

*
we are using clutter_script_load_from_file() to load the json script
and this script has all the actors required for our application. 
*
I assume that the above call creates new clutteractors (or textures)
and load them into memory. i.e., clutter_texture_new_from_file() would
have been called because we have provided the "filename" attribute for
all the Textures in our Json script. Is this what you mentioned as
"preloading" ?  How to stop this?
* We would like to know when  clutter_texture_new_from_file() will be called? 
Is it during clutter_script_load_from_file() or during 
clutter_actor_show(stage)?

* If its preloaded, how to unload textures? I dont see any unload texture api 
calls. Can you please help us in this?

*
When you say load only the required ones, should we create multiple
json scripts (one per screen) and load them and unload when not
required? I came across clutter_script_unmerge_objects(), which
unmerges the objects identified by merge_id (which is returned when
loading a UI definition). Will this unmerge does the unload of all
actors and frees up memory too?

Your help is greatly appreciated.

Thanks and Regards,
Mythili Rajaraman.

[email protected] wrote: -----

To: [email protected]
From: Emmanuele Bassi <[email protected]>
Sent by: [email protected]
Date: 10/06/2010 08:30AM
Subject: Re: How to handle big clutter application?

On Tue, 2010-10-05 at 21:08 -0500, [email protected] wrote:

> We are developing a big GUI application using Clutter 1.2.8, running
> it in Moblin.
> We have lots of images(ClutterTextures .png files) to be used in the
> GUI.
> Json script is used for loading actors in GUI.
> 
> Objects which are required for current screen will be shown and all
> other objects are hidden. 
> 
> Recently we reached a point where we could not add any more images(100
> or 120 images are fine, after that we could not add any more, some
> images are being referred by many ClutterTexture objects).
> 
> Segmentation fault occurs before we could see anything on the screen.
> My debug statement shows that clutter_actor_show(stage) is called
> before we get seg fault. 

you're loading a lot of image data on the GPU and you are marveling at
the fact that the driver is telling you that you've reached an OOM
condition? I'd be surprised if it didn't.

&#8226; don't pre-load all images.
&#8226; load only the required ones, and unload them when not needed any more.
&#8226; use a texture cache, like the one in Mx, to avoid loading image data
more than once.

> 1. Is there a better way to handle loading of textures? - Right now we
> just load the entire Json script with all actors and hide the unwanted
> actors for the current screen.

hiding won't prevent the image data to be loaded in memory.

> 2. Has anyone developed a big application using clutter with atleast
> 500 to 1000 images (ClutterTextures)?

sure; just not all at the same time, because that will consume all your
GPU memory.

also, it will kill your application startup time, by drowning it in I/O.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi, Open Source Software Engineer
Intel Open Source Technology Center

_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list







_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list

Reply via email to