2008/11/26 Jean-Baptiste BRIAUD -- Novlog <[EMAIL PROTECTED]>: > Hi Alex, > On 26 Nov 2008, at 09:13, Alexander Back wrote: > >> Hi Jean-Baptiste, >> >> Jean-Baptiste BRIAUD -- Novlog wrote: >>> Hi, >>> >>> I'm trying to manage memory footprint for all that icons on screen >>> where 80% could be the same shared instance of Image. >>> >>> I just realize I can't set the image instance on tabview.Page, on >>> Image itself ... the API appears to always be the URL string. >>> >>> I think that with the possibility to set the image instance directly >>> I'll be fine, is there a way to do that ? >>> Otherwise, how then can I (simply) ensure my icons are singleton ? >> Every icon/image (=resource in a qooxdoo-spoken way) is managed by the >> "qx.util.ResourceManager" in a map which programmatically ends up that >> every image is only referenced one time within the ResourceManager. >> The widgets are using the ResourceManager together with the >> ImageLoader >> to ensure the image is only loaded once, but I guess you have in mind >> that the image should be instantiated and the widgets are sharing this >> instance? Is that correct? >> > Yes, that was the idea but my main concern was memory footprint, so if > ressources are already cached and singleton, that sound correct to me. > >> Since an image is tied to every DOM element individually so you can't >> share the image. Every image used at your application boils down to an >> instance of "qx.html.Image" which is tied to a specific DOM element >> and >> there is no way to establish a sharing here. >> > Fine, if I understand correctly, several instances of Image can share > the same internal ressource, so the overhead is very small, isn't it ?
Exactly! :) The overhead is minimal (DOM node, maybe CSS styles). I have created small game like boulder dash in javascript and I have two engines - DOM based and Canvas based, DOM based engine works very well, but Canvas is faster ;) At the moment I'm thinkink if I should use qooxdoo for UI or not. I'm afraid that it can degrade performance :( But on the other side, game in qooxdoo can be interesting propagation for qooxdoo ;) Cheers - Petr > >> I hope I understand your questions right and the answers help you >> further :-) >> > I think so, thanks ! > >> cheers, >> Alex >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win >> great prizes >> Grand prize is a trip for two to an Open Source event anywhere in >> the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> qooxdoo-devel mailing list >> qooxdoo-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >> > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel