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

#1 2012-08-10 18:39:59

SimpleScratch
Scratcher
Registered: 2007-05-25
Posts: 100+

Variable display eating CPU cycles on RaspberryPi

Simply displaying variables in a project like this
http://scratch.mit.edu/projects/cliffordslocombe/2697920
seem to be eating CPU even when the program isn't running which makes editing the project very tricky as the GUI is so slow.

If anyone is running Scratch under Linux -can you check what happens on your system
(Low power PC owners could try and see what happens on them as well)

As running Scratch on the RaspberryPi is a fundemental project aim, we need to sort this one out if possible  smile

Simon

Offline

 

#2 2012-08-10 20:12:13

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Variable display eating CPU cycles on RaspberryPi

Well. The scratch variable displays (they are called watchers in the code) update every frame, though the mouse coordinates update every frame too. I don't really see how they could be the cause of the problem.


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#3 2012-08-11 13:45:18

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Variable display eating CPU cycles on RaspberryPi

I've found that displaying [lots of] variables in general (on all computers and OSes) tends to slow down the project for me as well.

Offline

 

#4 2012-08-12 13:41:46

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: Variable display eating CPU cycles on RaspberryPi

It probably updates them in a cycle and not every time a var changes  hmm

Offline

 

#5 2012-08-12 15:33:56

SimpleScratch
Scratcher
Registered: 2007-05-25
Posts: 100+

Re: Variable display eating CPU cycles on RaspberryPi

We don't know what the underlying problem is but its very easy to reproduce - just create 2 variables called a and b and the CPU is maxed out (according to a meter anyway)
We need someone with Linux CPU profiling/memory usage skills and I know that the RaspberryPi hasn't 100% hit USA yet but we really need this fixing ASAP if its possible !

Offline

 

#6 2012-08-12 19:01:29

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Variable display eating CPU cycles on RaspberryPi

roijac wrote:

It probably updates them in a cycle and not every time a var changes  hmm

Yes, I said that above.  tongue


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#7 2012-08-12 21:31:51

SimpleScratch
Scratcher
Registered: 2007-05-25
Posts: 100+

Re: Variable display eating CPU cycles on RaspberryPi

I've found that displaying lots of variables in general (on all computers and OSes) tends to slow down the project for me as well.

smile
I think we'd all agree that grinding to a halt by just showing two of them was a fairly bad idea though on a low cost computer intended to teach programming  smile

Simon

Offline

 

#8 2012-08-13 13:43:58

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: Variable display eating CPU cycles on RaspberryPi

SimpleScratch wrote:

I've found that displaying lots of variables in general (on all computers and OSes) tends to slow down the project for me as well.

smile
I think we'd all agree that grinding to a halt by just showing two of them was a fairly bad idea though on a low cost computer intended to teach programming  smile

Simon

If you can access the source code in Scratch on linux, I think someone could be able to modify so variables (watchers) update every time the value that they hold changes. It probbably is possible - and is what the Scratch Team should've done in the first place.


I'm back.
Maybe.

Offline

 

#9 2012-08-22 12:25:41

SimpleScratch
Scratcher
Registered: 2007-05-25
Posts: 100+

Re: Variable display eating CPU cycles on RaspberryPi

Offline

 

Board footer