Discuss Scratch

randomgamemaker
Scratcher
43 posts

Scripts running very slowly

For some reason, the scripts in this project: http://beta.scratch.mit.edu/projects/10125631/ run extremely slowly when you try to create a new account. At one point, I had a repeat command to read each item in a list in order. If you look at the list, you can see the items read slowly scrolling down. I tried this project on another, much older computer, and it worked great. All other scripts, including those that deal with lists, work fine.
I tried removing a custom block (that ran without screen refresh) that the Scratch cat has called ‘create new account,’ and just putting code in the script. The script ran the code instantly. What is going on?
I am using Chrome on a Mac.

Last edited by randomgamemaker (May 2, 2013 02:11:31)

jvvg
Scratcher
1000+ posts

Scripts running very slowly

I can confirm that it runs slowly for me too.

(Chrome on Windows 7)

Last edited by jvvg (May 2, 2013 01:59:25)



Professional web developer and lead engineer on the Scratch Wiki
Maybe the Scratch Team isn't so badWhy the April Fools' Day forum didn't work last year
DadOfMrLog
Scratcher
1000+ posts

Scripts running very slowly

The problem is the broadcast and waits inside your atomic block (i.e. the non-screen-refresh create account one) - you shouldn't do that…

Think of atomic blocks as stopping everything else from running while they run. Nothing else can happen, including other scripts receiving the broadcasts. This means you're waiting for something that will never happen. Scratch does put a time-limit of a couple of seconds on non-refresh blocks, which means it will eventually get there, but it's really gonna slow it down horribly, as you've found…

Hope that helps!


Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

Powered by DjangoBB