This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-06-20 14:04:04

Samueldora
Scratcher
Registered: 2009-07-19
Posts: 90

Handling of long blocks suddenly becomes very slow. Why?

When trying to simulate a historic computer, I snapped together some 150 instructions in one script, and was surprised that there moved very slow and were difficult to handle. They performed without problems then, but I'd like to understand why do they get so slow?

Most of them were send and assign blocks.

Offline

 

#2 2010-06-20 14:33:40

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: Handling of long blocks suddenly becomes very slow. Why?

Because of the way scratch blocks work, the script you're attaching to is re-drawn every time it changes. Scratch blocks are vector graphics (if I remember correctly), so drawing them over and over takes a while...


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#3 2010-06-20 16:23:10

Samueldora
Scratcher
Registered: 2009-07-19
Posts: 90

Re: Handling of long blocks suddenly becomes very slow. Why?

Makes sense! I would expect a linear growth of machine time though, but it feels like exponential growth or limited capacity.

Offline

 

#4 2010-06-20 16:34:40

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: Handling of long blocks suddenly becomes very slow. Why?

Samueldora wrote:

Makes sense! I would expect a linear growth of machine time though, but it feels like exponential growth or limited capacity.

They are! It's like 0.1 lagging or such for each block. From what I've seen, the inclusion of 10-20 blocks already slows you down a bit. Have you tried splitting the scripts up?


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#5 2010-06-20 16:50:05

Samueldora
Scratcher
Registered: 2009-07-19
Posts: 90

Re: Handling of long blocks suddenly becomes very slow. Why?

Thank you for the information and the hint. Yes, I already thought about  splitting up, and I will do so, though is a step away from the original (meters of punched tape). On the other hand, it pays off in readability.

Offline

 

#6 2010-06-20 20:15:52

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Handling of long blocks suddenly becomes very slow. Why?

Actually, it was my understanding that the blocks were recompiled each time you added a block, not just redrawn... But I'm probably wrong  smile

Offline

 

#7 2010-06-21 04:01:57

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: Handling of long blocks suddenly becomes very slow. Why?

Greatdane wrote:

Samueldora wrote:

Makes sense! I would expect a linear growth of machine time though, but it feels like exponential growth or limited capacity.

They are! It's like 0.1 lagging or such for each block. From what I've seen, the inclusion of 10-20 blocks already slows you down a bit. Have you tried splitting the scripts up?

Splitting the scripts up will just slow down the actual project...


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#8 2010-06-21 06:36:58

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

Re: Handling of long blocks suddenly becomes very slow. Why?

juststickman wrote:

Greatdane wrote:

Samueldora wrote:

Makes sense! I would expect a linear growth of machine time though, but it feels like exponential growth or limited capacity.

They are! It's like 0.1 lagging or such for each block. From what I've seen, the inclusion of 10-20 blocks already slows you down a bit. Have you tried splitting the scripts up?

Splitting the scripts up will just slow down the actual project...

Soo, slow script drawing, or slow project running?


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#9 2010-06-21 07:06:16

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: Handling of long blocks suddenly becomes very slow. Why?

I suggest getting a faster computer.


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#10 2010-06-21 11:32:35

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: Handling of long blocks suddenly becomes very slow. Why?

meew0 wrote:

I suggest getting a faster computer.

Alright, so let's spend another 1,000 dollars to solve the problem when we can solve it in 3 minutes for free.

tongue


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#11 2010-06-21 11:56:33

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: Handling of long blocks suddenly becomes very slow. Why?

Greatdane wrote:

meew0 wrote:

I suggest getting a faster computer.

Alright, so let's spend another 1,000 dollars to solve the problem when we can solve it in 3 minutes for free.

tongue

Lol.


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

Board footer