Page quickly becomes unresponsive

As I am working on my project, the site begins to slow progressively to the point of freezing up entirely. I don't believe this is an issue with my code because it persists beyond using the stop button. My project runs just fine when I open it from the my projects page.

can you provide a link to the project?

It might be the size of the project…. Link?

Are you using a lot of sounds?

I've looked at it, and I think it might have to do with clones increasing exponentially. I'll explain why I think this.

A hat block in a sprite also runs in it's clones. Let's take this script.
[scratchblocks]
when [m v] key pressed
create a clone of [myself v] :: events
[/scratchblocks]
When you press "m" it'll create a new clone of the sprite. The issue with this is, when you press "m" again, it also runs in the clone. The clone will then create a clone of itself, as well as the original sprite. This, in turn, creates clones exponentially.

To avoid this issue, add a check to make sure that only the original sprite runs the code.
[scratchblocks]
when [m v] key pressed
if <not (my [temporary? v] :: sensing) ::> {
create a clone of [myself v] :: events
} :: events
[/scratchblocks]

The only instances of what I could find that this would be a problem, was with the 'drop' broadcast (in the weapon sprites), and in the test dummy sprite.

Now, I do have to say this, I actually didn't see a drop in frame rate, so...

you don't need to post the link 3 times, 1 is fine. Plus, if you reply, to someone, everyone else in the topic, will most likely get notified. If they don't respond, then they're probably not on the forum at the moment.

Would those temporary clones not be deleted once the stop button is pressed? The slowdown/lag on my end persists forever until the page is reloaded.

The clones should delete when you press the stop button. If I may ask, how much time does it take for it to start lagging?

It usually takes a 4-6 minutes.

link...............?

dude, the link is in a previous post.

Nothing bad happens for me, it works fine! Might be a device problem.

Does Snap! happen to have any minimum system requirements? I'm fairly certain that my pc isn't a calculator, but perhaps that's hubris speaking since I built it myself.

Try asking @bh

Is it possible this was cause by my use of the snapinator converter to bring my project over to snap? On a side not the lag seems to be worsened drastically when I open separate menus such as the sprite maker.

it could be something to do with translating it using snapinator, because things that run smoothly in scratch, might not run as smoothly in snap.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.