More layouts = more ram usage ?

Discussion and feedback on Construct 2

Post » Thu Sep 26, 2013 11:01 pm

Hello!
I have a question/pb : i reduced my images, to win ram usage, then done a few levels and i saw that in fact, my ram has increased.
After trying to understand, i thought that the only explanation could be that i created more layouts, even if my images were smaller.
So i duplicated some scenes (14 times), and i lost around 8 mb of ram. I duplicated more and i lost more ram again (12 in total). I work on mobiles, and it's a huge lost of memory.
It uses the exact same images (in spreadsheets or not), and it's just scene duplicated, so I don't understand why i have so much waste of ram.
Did anyone notice it too before ?
Is that normal ? Is it a bug or am I doing something wrong ?

(i'm on r139 in case of)

Thanks :)goldentreee2013-09-26 23:01:45
B
12
S
6
G
2
Posts: 105
Reputation: 3,969

Post » Thu Sep 26, 2013 11:26 pm

The only time you should be able to increase memory use is when you add new textures.

When you say duplicates do you mean multiple instances, or brand new objects?
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Thu Sep 26, 2013 11:31 pm

Thanks for your answer.
By "duplicate" i mean "duplicate layout", the option you have when you right click on the name of a layout.
I always use it when i do a level that has the same "base" as the previous one, maybe it comes from here ?
Cause i didn't add more texture, just duplicated layouts and i lose ram.goldentreee2013-09-26 23:41:58
B
12
S
6
G
2
Posts: 105
Reputation: 3,969

Post » Thu Sep 26, 2013 11:41 pm

There's no reason for it to use more ram.
Where are you getting that reading from?
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Thu Sep 26, 2013 11:41 pm

Hmm, that's weird. It shouldn't be the case. Are you sure it's just the extra layouts that are causing the problem?

@Ashley any ideas?
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Fri Sep 27, 2013 12:48 am

Thanks to the both of you for your answers again :)

I have the reading on Instruments (xcode).

So, i made mesurements. I use a single eventsheet for all the project and i thought that maybe the pb could come from here, cause all the layouts are by consequence connected to it.

I made 4 exports to test :

1 - eventsheet present and 14 more layouts duplicated : 49 MB.
2 - eventsheet present and i got rid of the 14 : 42 MB.
3 - eventsheet deleted and 14 more layouts duplicated : 45 MB.
4 - eventsheet deleted and i got rid of the 14 : 36 MB.

i've not touch at all to the textures.

I don't really know how to read that cause it's not very logical.
Event if there is a pb with my eventsheet (i will search, but i don't know if the ram can be changed by that), it doesn't explain the big difference i have when this eventsheet is not in the project, between the built with 14 more layouts duplicated and the other one.
I still have a huge loss of ram (9 mb).

I'm too tired tonight to continue (lol), i maybe miss something somewhere. A good night and I will have fresher ideas on it :)goldentreee2013-09-27 00:50:53
B
12
S
6
G
2
Posts: 105
Reputation: 3,969

Post » Fri Sep 27, 2013 1:39 am

Not sure what to think of that.
How big is the image folder after the game is exported?
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Fri Sep 27, 2013 3:43 am

the image folder looks ok, no more images than the ones that are supposed to be used.
Its weight is 1.11 mo.
B
12
S
6
G
2
Posts: 105
Reputation: 3,969

Post » Fri Sep 27, 2013 11:39 am

From there do you get the informations abbout the ram usage ?
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Fri Sep 27, 2013 11:56 am

Hello.
I read my ram on Instruments in Xcode.

In construct2, the estimated use of ram indicated is 30.9 mb.
I have 42 on the device.
I know it's just a indication, but i have a big difference with what i have in real.goldentreee2013-09-27 12:32:22
B
12
S
6
G
2
Posts: 105
Reputation: 3,969

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests