Applying a mask makes application freeze for half a second.

Hello.

this is funny, since this problem have started showing itself well into the development of my application, so maybe something changed I’m not aware of, but here goes.

For some reason, when I apply a mask (an image) to a screen I’m building in my application, it makes the application freeze for about 500 ms. It’s not much, but when sliding between screens, if there is a lag of 500 ms from when you clicked the button to when the actual sliding start, it shows up and is making the application seem sluggish and disrupts the flow.

Any reason why setting this perfectly simple mask over my screen create this freezing??

Thanks.

Still no answer about this issue?? this really makes my interface flow stutter, and does not look good, why is there a freeze when mask is applied which vanish if the mask is not applied and/or commented??

Hope to have a solution for this quickly…

Hi @formatc,

Can you provide more details on this? Which devices and OSes you’re seeing this on? The size of the mask? Are you actually creating the mask on scene change? Can you create it in advance (and store it in memory) and then apply it to the scene when necessary?

Brent

I’m seeing this freeze/lag in the emulator, and both on android phone (galaxy s3) and iphone (4s) which are the platforms I’m working for so they are the only tested, so far.

The mask is the same size of the screen (640x960) as defined in my config, I’m not changing scenes but manage a page I create in a group object, transitioning the group off screen when I create the new group for the new screen and transition the new screen in.

Even if I create it in advance, and then only apply it when I need to show my screen, the actual applying of the mask is what causing the freeze, if I create it but don’t assign it to my group, no freezing happens, and it happens weather the mask is applied to my group before I populate it with my objects, and it happens if I do it after it’s populated.

The same thing happens with other screens where I don’t use a whole screen mask, but use a small mask to mask a small progress bar, for example, it shows the same problem, about 500 ms freeze of everything, and then it goes on normally.

I hope this information helps, and if not, I might be able to mock up a small project file for you to test on your own with the same mask files I’m using, maybe they are the problem, for some unknown reason…

Hi @formatc,

In this case, a test project would really help us figure out if there’s a regression bug associated with masking. Can you assemble that test (very simple… as simple as you can make it) and submit it as a bug report?

http://developer.coronalabs.com/content/bug-submission

Thanks,

Brent

Will do, thanks :slight_smile:

Still no answer about this issue?? this really makes my interface flow stutter, and does not look good, why is there a freeze when mask is applied which vanish if the mask is not applied and/or commented??

Hope to have a solution for this quickly…

Hi @formatc,

Can you provide more details on this? Which devices and OSes you’re seeing this on? The size of the mask? Are you actually creating the mask on scene change? Can you create it in advance (and store it in memory) and then apply it to the scene when necessary?

Brent

I’m seeing this freeze/lag in the emulator, and both on android phone (galaxy s3) and iphone (4s) which are the platforms I’m working for so they are the only tested, so far.

The mask is the same size of the screen (640x960) as defined in my config, I’m not changing scenes but manage a page I create in a group object, transitioning the group off screen when I create the new group for the new screen and transition the new screen in.

Even if I create it in advance, and then only apply it when I need to show my screen, the actual applying of the mask is what causing the freeze, if I create it but don’t assign it to my group, no freezing happens, and it happens weather the mask is applied to my group before I populate it with my objects, and it happens if I do it after it’s populated.

The same thing happens with other screens where I don’t use a whole screen mask, but use a small mask to mask a small progress bar, for example, it shows the same problem, about 500 ms freeze of everything, and then it goes on normally.

I hope this information helps, and if not, I might be able to mock up a small project file for you to test on your own with the same mask files I’m using, maybe they are the problem, for some unknown reason…

Hi @formatc,

In this case, a test project would really help us figure out if there’s a regression bug associated with masking. Can you assemble that test (very simple… as simple as you can make it) and submit it as a bug report?

http://developer.coronalabs.com/content/bug-submission

Thanks,

Brent

Will do, thanks :slight_smile: