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

#1 2008-10-11 19:01:02

deerel
Scratcher
Registered: 2008-08-23
Posts: 89

Java player performance drops rapidly (more than linear) in broadcast

When there are many scripts, the broadcast (not the when I receive, but the broadcast itself) takes VERY much time, as can be seen by comparing these projects:
1. http://scratch.mit.edu/projects/deerelResearch/292392  272 scripts, I'm getting 32 on all variables (that is probably the limit for steps per second in Java player, so it runs at fine speed)
2. http://scratch.mit.edu/projects/deerelResearch/292393 972 scripts, I'm getting 4.7-4.8 on all variables, this is much higher than linear proportion (even for first variable, where no projects are in fact run, only searching takes place).
3. http://scratch.mit.edu/projects/deerelResearch/292396 2172 scripts, I'm getting 1 or lower on all variables, which is drop by 32 (or more, since 32 is limit) with only roughly 8-times the script number compared to first one.

It also seems strange I get roughly same numbers for all variables in the same project, they should get lower from top to bottom, but maybe you cleverly prune the empty projects so there is virtually no difference in having/not having when I receive hat when nothing is connected to it, but this is a minor issue, I'm concerned by the above mentioned thing.

Last edited by deerel (2008-10-14 21:34:37)

Offline

 

#2 2008-10-15 13:43:28

deerel
Scratcher
Registered: 2008-08-23
Posts: 89

Re: Java player performance drops rapidly (more than linear) in broadcast

Bringing up my post. After installing the newest Java version, which corrected some other issues, this one still holds (the numbers went up _a_little_, but still, the first variables are 32, 6.6 and 1.2; this is not consistent with script ratio 272:972:2172, so the searching during broadcast have some real problem. Could someone please report that his ratios are also out?
To Scratch team: will you please address this?

Offline

 

#3 2008-10-15 13:49:08

deerel
Scratcher
Registered: 2008-08-23
Posts: 89

Re: Java player performance drops rapidly (more than linear) in broadcast

BTW, suggestion. Set of events is small and finite, known beforehand. So is the set of sprites and processes (it may be a little larger than set of events, of course). Maybe you can consider caching list of processes for each event. It needs virtually no change to the code, if you do it in lazy manner. This is really ideal candidate for caching.

Last edited by deerel (2008-10-15 16:45:36)

Offline

 

#4 2008-10-19 16:39:24

deerel
Scratcher
Registered: 2008-08-23
Posts: 89

Re: Java player performance drops rapidly (more than linear) in broadcast

deerel wrote:

The first variables are 32, 6.6 and 1.2; this is not consistent with script ratio 272:972:2172, so the searching during broadcast have some real problem. Could someone please report that his ratios are also out?
To Scratch team: will you please address this?

bump

Offline

 

Board footer