Destroy outside layout question

Discussion and feedback on Construct 2

Post » Sun Jul 27, 2014 8:34 am

The question is:

I got 2 examples:

Behaviour "destroy outside layout"

and

Every 40 sec
Item is outside layout
-> Destroy item

Will i get a performance benefict by using the second one? Because i don't care if the effect doesn't trigger at every tick, i just need to clean the items outside layout every few seconds... but if there is absolutely no difference in CPU usage, then i'll go with the first solution.
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Post » Sun Jul 27, 2014 1:57 pm

No difference at all.
B
51
S
16
G
9
Posts: 1,098
Reputation: 11,252

Post » Mon Jul 28, 2014 1:59 am

I do not know how the behavior is coded, but I would think destroying objects once every 40 seconds would have a larger hit on the garbage collector all at once than many small deletes would... and of coarse things would be building up in memory for 40 seconds which has a larger memory footprint than deleting as you go. During any one second computers usually have large amounts of unused processor cycles so the time spent cleaning up little things constantly is probably most efficient.
B
21
S
5
Posts: 196
Reputation: 1,984


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests