Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » Which loads faster: Blocks or Lists?
- WolfCat67
-
Scratcher
1000+ posts
Which loads faster: Blocks or Lists?
I've been working on a really large note block song compilation for a while now, and lots of people seem to enjoy it. However, the biggest complaint is that it takes a long time to load due to the use of over 5500 scripts due to the amount of note block songs in the project. I've been wanting to add more songs to it, but I'm prioritizing fixing the loading times so that more people can view it.
I've thought up one way to counter the issue by decreasing the amounts of scripts, and that's by using lists. You can find three different methods of compacting I've used on my test account, but most of them have been slow. However, with the method @footsocktoe gave me (see “Method 3” project on my test account), it's only a couple of digits per list; of course, the only issue is that multiple lists will need to be used to include chords and overlapping notes throughout most of the songs. It should, at most, create around 100 lists.
This begs the question, though; which loads faster? Blocks or Lists? Keep in mind that each list will contain every note value and beat for each note throughout songs ranging from 7 measures to 200 at varying tempos, and that there will of course be multiple lists to allow for overlapping notes and chords with little to no slowness caused from attempting to split apart strings.
And if the answer is lists, would it be worth it to create a complex method of splitting the strings and including all values in one list (while maintaining a stable FPS and playing songs at a reasonable speed) or would multiple lists work just fine for compacting?
I've thought up one way to counter the issue by decreasing the amounts of scripts, and that's by using lists. You can find three different methods of compacting I've used on my test account, but most of them have been slow. However, with the method @footsocktoe gave me (see “Method 3” project on my test account), it's only a couple of digits per list; of course, the only issue is that multiple lists will need to be used to include chords and overlapping notes throughout most of the songs. It should, at most, create around 100 lists.
This begs the question, though; which loads faster? Blocks or Lists? Keep in mind that each list will contain every note value and beat for each note throughout songs ranging from 7 measures to 200 at varying tempos, and that there will of course be multiple lists to allow for overlapping notes and chords with little to no slowness caused from attempting to split apart strings.
And if the answer is lists, would it be worth it to create a complex method of splitting the strings and including all values in one list (while maintaining a stable FPS and playing songs at a reasonable speed) or would multiple lists work just fine for compacting?
- yzyzyz
-
Scratcher
500+ posts
Which loads faster: Blocks or Lists?
I think that lists load faster, but I'm not so sure.
And about the splitting, I don't know.
And about the splitting, I don't know.
- asivi
-
Scratcher
1000+ posts
Which loads faster: Blocks or Lists?
You need blocks to read list's items. 
One variable(read and write) to go through lists and then read an item, time consuming.
However in case you use lists do not show in screen when testing your scripts(it forces screen refresh)

One variable(read and write) to go through lists and then read an item, time consuming.
However in case you use lists do not show in screen when testing your scripts(it forces screen refresh)
Last edited by asivi (Aug. 13, 2017 08:26:58)
- customhacker
-
Scratcher
1000+ posts
Which loads faster: Blocks or Lists?
I have actually been working on a list compiler, I believe that that may work faster. I am not 100% sure.
- WolfCat67
-
Scratcher
1000+ posts
Which loads faster: Blocks or Lists?
You need blocks to read list's items.Yeah, I need blocks of course, but I was thinking lists and a couple scripts would load in faster than 6000 scripts would.
One variable(read and write) to go through lists and then read an item, time consuming.
However in case you use lists do not show in screen when testing your scripts(it forces screen refresh)

- Discussion Forums
- » Questions about Scratch
-
» Which loads faster: Blocks or Lists?



