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

#1 2012-08-21 08:47:26

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

Help needed with slow running Scratch on RaspberryPi

If you can help, please join in here
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=77&t=15215

What's the problem you say?
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=77&t=12522

Probably going to need knowledge of running/compiling Scratch on a Linux machine - not for beginners  smile

Simon

Offline

 

#2 2012-08-21 09:37:18

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

Re: Help needed with slow running Scratch on RaspberryPi

Well... Is it only the variable watchers that slow it down? I could fix that I think.


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

Offline

 

#3 2012-08-21 09:42:12

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

Re: Help needed with slow running Scratch on RaspberryPi

Hmm... After looking at it, it seems to only be updating when the value changes. Does it lag when the variable changes?


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

Offline

 

#4 2012-08-21 10:54:11

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

Re: Help needed with slow running Scratch on RaspberryPi

On the RaspberryPI, things slow down (CPU usage goes thru roof) just by simply creating variables (which automatically displays them)
The load is high even if you do nothing else  sad
Untick displaying them and things are a lot better  smile
"Variable watchers" sounds like a very likely name for the culprit  smile
So glad to get a quality Scratcher going on this  smile
Simon

Offline

 

#5 2012-08-21 11:26:53

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

Re: Help needed with slow running Scratch on RaspberryPi

I removed something that made the watchers resize internally every frame. They are kind of broken at the moment, but I would like to see if the lag disappears.

Download the new image here: https://dl.dropbox.com/u/6274273/Scratch.image

EDIT: Ok, I've fixed it completely. It should be faster and work properly at the same time.  big_smile

Last edited by MathWizz (2012-08-21 11:36:56)


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

Offline

 

#6 2012-08-21 19:08:21

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

Re: Help needed with slow running Scratch on RaspberryPi

Your modified image uses much less CPU in Windows XP  smile  but won't work on my RaspberryPi
(To be fair No modified Scratch image that I can download does - they all give a black screen where Scratch should be  sad  )
Since you prob don't have a RaspberryPi yet, could you baby step me through the changes needed so I can try to mod the Scratch.image on the RaspberryPi?

Great stuff so far though - look VERY promising  smile

Simon

Offline

 

#7 2012-08-21 19:21:58

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

Re: Help needed with slow running Scratch on RaspberryPi

Did you replace the Scratch.image with mine? I don't happen to know where that is located on whatever version of linux the RaspberryPi runs though. I don't know why you would be getting a black screen.  hmm


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

Offline

 

#8 2012-08-21 19:53:03

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

Re: Help needed with slow running Scratch on RaspberryPi

Yes -I copied your image to /usr/share/scratch/Scratch.image and then just ran the desktop shortcut - black screen - when I put the orig back - its OK again  sad

I've been previously experimenting with other Scratch mods - Sense and S4A  and they don't work either - of course it could just be me!

I've not got into Scratch on Linux previously so I don't know what the issues are but it def seems that the squeak VM environment isn't as VM as it could be  smile

We need to find Linux Scratch gurus - know any?  smile

Simon
[edit]path edited[/edit]

Last edited by SimpleScratch (2012-08-21 19:59:00)

Offline

 

#9 2012-08-21 19:58:08

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

Re: Help needed with slow running Scratch on RaspberryPi

What about the hand-holding mod approach?

Simon

Offline

 

#10 2012-08-21 20:19:09

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

Re: Help needed with slow running Scratch on RaspberryPi

You mean I should tell you how to mod Scratch?  tongue  I could give you a change set to import...


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

Offline

 

#11 2012-08-21 20:57:39

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

Re: Help needed with slow running Scratch on RaspberryPi

http://pantherprogramming.weebly.com/pa … buntu.html is a tutorial on how to run different Scratch images on Linux/Ubuntu. I'm sure you can do the same thing with the Raspberry Pi. It's probably easier/safer than replacing the actual Scratch Image.  smile

Offline

 

#12 2012-08-21 21:00:22

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

Re: Help needed with slow running Scratch on RaspberryPi

@Magnie well its not easier than replacing the actual Scratch image and it doesn't make any diff - still doesn't work  sad

Simon

Offline

 

#13 2012-08-21 21:23:39

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

Re: Help needed with slow running Scratch on RaspberryPi

SimpleScratch wrote:

@Magnie well its not easier than replacing the actual Scratch image and it doesn't make any diff - still doesn't work  sad

Simon

Yeah... probably not easier.

MathWizz: It actually doesn't work for me on Ubuntu either.  hmm

Offline

 

#14 2012-08-21 22:25:57

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

Re: Help needed with slow running Scratch on RaspberryPi


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

Offline

 

#15 2012-08-21 22:33:44

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

Re: Help needed with slow running Scratch on RaspberryPi

MathWizz wrote:

Try to file this in then: https://dl.dropbox.com/u/6274273/working.1.cs

Could you explain what you mean.  tongue

Offline

 

#16 2012-08-21 22:46:55

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

Re: Help needed with slow running Scratch on RaspberryPi

Uploading youtube video... xD


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

Offline

 

#17 2012-08-21 22:51:29

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

Re: Help needed with slow running Scratch on RaspberryPi


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

Offline

 

#18 2012-08-22 06:00:05

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: Help needed with slow running Scratch on RaspberryPi

Wow, that video's fast.  tongue  And it's hard to tell that you're actually Shift+clicking "R", and that...


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#19 2012-08-22 07:07:49

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

Re: Help needed with slow running Scratch on RaspberryPi

"Wow, that video's fast"
@MathWhizz - I managed to follow (I think) up to point where I've pasted in the code from your .cs file.

You then seem to click on fileitin and your video shows it compiling and saving?? but nothing happens on my system (either in Linux or XP) so I must not be following you.
Could you provide the missing link info please  smile

Simon

Offline

 

#20 2012-08-22 07:46:18

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

Re: Help needed with slow running Scratch on RaspberryPi

While waiting for MathWhizz I found this

: How do I import goodies/changesets/programs into my image?

A: From the World Menu select "open..." and "file list". Choose the path and filename of the .st or .cs file in the upper-right pane. In this same file list pane, bring up the pop-up menu (middle mouse button) and choose "file into new changeset" to import all the code into your image.

Which gets the changes into my image and the modded Scratch seems MUCH better  smile
But then having trouble saving this modified image without squeak telling me that

Code:

cannot locate sources file named /usr/lib/squeak/4/4/7-2357/SqueakV2.sources

Hopefully this is just a minor glitch

Simon

Offline

 

#21 2012-08-22 07:58:52

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

Re: Help needed with slow running Scratch on RaspberryPi

Ok - 1 step further - after I did the "file into new changeset" instruction above I then did Shift-ClickR and save image for end user and then I seemed to have a nice new image.
[deleted wrong info]

AND ALL SEEMS OK  smile

Now need to test it out with a few people and then HOW do we go about getting the big boys and girls at Scratch HQ to bless the changes as a bug-fix and not a mod?

@MathWhizz - THANK YOU VERY MUCH  smile

Simon

Last edited by SimpleScratch (2012-08-22 08:29:38)

Offline

 

#22 2012-08-22 09:37:08

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

Re: Help needed with slow running Scratch on RaspberryPi

SimpleScratch wrote:

Ok - 1 step further - after I did the "file into new changeset" instruction above I then did Shift-ClickR and save image for end user and then I seemed to have a nice new image.
[deleted wrong info]

AND ALL SEEMS OK  smile

Now need to test it out with a few people and then HOW do we go about getting the big boys and girls at Scratch HQ to bless the changes as a bug-fix and not a mod?

@MathWhizz - THANK YOU VERY MUCH  smile

Simon

Glad to help.  big_smile
It is interesting that nothing happened for you when you pasted it though...
Did you select all the text first?

Last edited by MathWizz (2012-08-22 09:37:31)


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

Offline

 

#23 2012-08-22 10:04:44

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

Re: Help needed with slow running Scratch on RaspberryPi

The pasting worked fine - its what do you do next having pasted it (Your video is very fast and doesn't show what sort of click where  smile  )
If you could let  us know - it'd be useful info for future  smile

Also, could you give us a few words on what the problem was and what you did to fix it (as squeak is still a foreign language to me mostly)

Simon

Offline

 

#24 2012-08-22 10:26:41

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

Re: Help needed with slow running Scratch on RaspberryPi

SimpleScratch wrote:

The pasting worked fine - its what do you do next having pasted it (Your video is very fast and doesn't show what sort of click where  smile  )
If you could let  us know - it'd be useful info for future  smile

I pasted it, selected it all, then right clicked on the text.

SimpleScratch wrote:

Also, could you give us a few words on what the problem was and what you did to fix it (as squeak is still a foreign language to me mostly)

Simon

Every frame, the watcher resizes itself. I changed it to only resize when it changes.

Last edited by MathWizz (2012-08-22 10:27:01)


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

Offline

 

#25 2012-08-22 11:17:35

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

Re: Help needed with slow running Scratch on RaspberryPi

" pasted it, selected it all, then right clicked on the text."
It was the selecting it that makes the difference - I hadn't done that.  JFI Its clicking on my scroll wheel that seems to bring up things on my RPi in squeak.
Ta again  smile

"Every frame, the watcher resizes itself"  - Ah - I wonder if there are any other objects (timer.xpos,ypos etc) that do the same?

Simon

Offline

 

Board footer