How are you guys?
Next, the question is ... if I load the texture in any variable:
local x = Texture.new("file.png") |
And then do one:
stage: addChild(Bitmap.new(x)) |
I loaded this image into memory once and then displayed it on the screen ... Okay ... But what if I do for example one:
for i = 1, 10000 do
stage:addChild(Bitmap.new(x))
end |
Is the memory consumption 10 thousand times higher or will it only consume a single space because it is using the same texture 10 thousand times?
Tnx
Comments
https://wiki.giderosmobile.com/index.php/Profiling
In gideros you just need to click this:
It produces a nice html output
Please share your results.
But it will be nice to see your profiling results.
Regards.
Likes: SinisterSoft, MoKaLux
Likes: MoKaLux, plicatibu
https://deluxepixel.com
Cool...
Likes: MoKaLux, SinisterSoft, kinrpg
Likes: talis, rrraptor, SinisterSoft, plicatibu, kinrpg
But I prefer to store textures in local/global variables, cuz its a bit faster
Likes: kinrpg
I did a test with millions of sprites and particles and ran without lags etc ...
I followed the tip of the colleague above also to put all textures in a gblobal variable, there it is easy to call from anywhere.
Thank you.
https://youtu.be/Q6z-3tG-WUg
Likes: MoKaLux, SinisterSoft