Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » List Item Limit
- Kemek78
-
Scratcher
13 posts
List Item Limit
I'm working on multiple projects that save very long strings of numbers onto list. I know there is a limit to the amount of characters in an item, however I can't find an exact value on the wiki.
Thanks
Thanks
- TEAMWFS
-
Scratcher
100+ posts
List Item Limit
I'm working on multiple projects that save very long strings of numbers onto list. I know there is a limit to the amount of characters in an item, however I can't find an exact value on the wiki.How many items a list can hold:
Thanks
There is no limit to the length of an item or the amount of items a list can hold, apart from an amount sufficient to crash Scratch. However, you may not be able to save a project online if your list takes too long to upload, because Scratch will return a network error after about 30 seconds. Few lists need to contain that amount of information, but a dictionary of 350,000 English words may fail to save when 250,000 words would succeed. This is due to the list being stored twice in the JSON source.
How many characters per item a list can hold:
10240 characters, I think.
Last edited by TEAMWFS (June 28, 2017 19:01:26)
- -Lite-
-
Scratcher
500+ posts
List Item Limit
Please cite the wiki when taking from it. We know you didn't write the info about the limit above.I'm working on multiple projects that save very long strings of numbers onto list. I know there is a limit to the amount of characters in an item, however I can't find an exact value on the wiki.How many items a list can hold:
Thanks
There is no limit to the length of an item or the amount of items a list can hold, apart from an amount sufficient to crash Scratch. However, you may not be able to save a project online if your list takes too long to upload, because Scratch will return a network error after about 30 seconds. Few lists need to contain that amount of information, but a dictionary of 350,000 English words may fail to save when 250,000 words would succeed. This is due to the list being stored twice in the JSON source.
How many characters per item a list can hold:
I don't know quite yet, but I'm trying to find it out with this application.
About the limit, it depends on what else is in your project. If you have a lot of sounds and sprites, less. This is because sb2 files have a hard-coded size limit of 50 MB. No project could test this. Simply download your file, with an empty list. Find out how many bytes. Subtract that from the max, and that is twice how long a list can be. It is stored as such:
[
“item1”,
“item2”,
“item3”
]
(x2)
With this info, you can easily calculate the max for your project.
- asivi
-
Scratcher
1000+ posts
List Item Limit
Well, for saving lists the limit is around 2.5 megabytes(discounting other stuff) prject.json limit as @VTEAMWFS quoted, but the limit for lists populated on the go would be the power of your PC probably.
- -Lite-
-
Scratcher
500+ posts
List Item Limit
-removed-
Last edited by -Lite- (June 28, 2017 21:15:31)
- asivi
-
Scratcher
1000+ posts
List Item Limit
Well, for saving lists the limit is around 2.5 megabytes(discounting other stuff) prject.json limit as @VTEAMWFS quoted, but the limit for lists populated on the go would be the power of your PC probably.Please see my answer right above yours. Your answer is false; the limit for a project is 50 megabytes.. discounting other stuff the limit for a list would be 50 megabytes/2
Reread my response.
- -Lite-
-
Scratcher
500+ posts
List Item Limit
Well, for saving lists the limit is around 2.5 megabytes(discounting other stuff) prject.json limit as @VTEAMWFS quoted, but the limit for lists populated on the go would be the power of your PC probably.Please see my answer right above yours. Your answer is false; the limit for a project is 50 megabytes.. discounting other stuff the limit for a list would be 50 megabytes/2
Reread my response.
but the limit for lists populated on the go would be the power of your PC probablyThat's true for everything.
Last edited by -Lite- (June 28, 2017 21:16:07)
- asivi
-
Scratcher
1000+ posts
List Item Limit
What thing is unnacurate? please quote the part exactly and how it is. Thanks.
Last edited by asivi (June 28, 2017 20:43:10)
- -Lite-
-
Scratcher
500+ posts
List Item Limit
What thing is unnacurate? please quote the part exactly and how it is. Thanks.
Well, for saving lists the limit is around 2.5 megabytes(discounting other stuff) prject.json limit as @VTEAMWFS quoted-removed-
Last edited by -Lite- (June 28, 2017 21:13:39)
- asivi
-
Scratcher
1000+ posts
List Item Limit
OK, i will give you a more reliable reference, but firstly you must to know that if you try to upload a project with a JSON file bigger than 2.5 megabytes you will not suceed, lists are saved in the JSON file among other stuff like script assets, variables, costumes, sounds, bacdrops,etc all features definition.
https://scratch.mit.edu/discuss/post/2473166/ it is a response by @TheLogFather in other topic.
https://scratch.mit.edu/discuss/post/2473166/ it is a response by @TheLogFather in other topic.
- -Lite-
-
Scratcher
500+ posts
List Item Limit
OK, i will give you a more reliable reference, but firstly you must to know that if you try to upload a project with a JSON file bigger than 2.5 megabytes you will not suceed, lists are saved in the JSON file among other stuff like script assets, variables, costumes, sounds, bacdrops,etc all features definition.Oh wow, I did not know. I had been told what I repeated to you, and just internalized it. I want to apologize for possibly confusing the OP and possibly derogating you.
https://scratch.mit.edu/discuss/post/2473166/ it is a response by @TheLogFather in other topic.
- asivi
-
Scratcher
1000+ posts
List Item Limit
Don't be worried about, by discussing all of us,you and i and any other reading this topic,are learning.
Greets.
Greets.
- -Lite-
-
Scratcher
500+ posts
List Item Limit
Don't be worried about, by discussing all of us,you and i and any other reading this topic,are learning.I want to thank you a lot. I had faulty code in one of my Scratchblocks manipulation libraries assuming the limit was what I mentioned above.
Greets.
- awesome-llama
-
Scratcher
1000+ posts
List Item Limit
I actually recently found the saving problem when I tried to make a project with lots of words for a whitelist. I had to use the offline editor to save the project and upload it to Scratch.
- asivi
-
Scratcher
1000+ posts
List Item Limit
Hi @awesome-llama let me suggest to import such list as an string and then split it and go adding to a list, it could take a while depending of the final list size and the amount of characters in such long string and the power of your PC.
An example: https://scratch.mit.edu/projects/167222250/
An example: https://scratch.mit.edu/projects/167222250/
- -Lite-
-
Scratcher
500+ posts
List Item Limit
Hi @awesome-llama let me suggest to import such list as an string and then split it and go adding to a list, it could take a while depending of the final list size and the amount of characters in such long string and the power of your PC.That would allow you possibly twice as much room, as variables don't have to be stored twice.
An example: https://scratch.mit.edu/projects/167222250/
I am thinking of encoding the data in images, as the images are not limited like the project.json. I might make a prototype soon
- asivi
-
Scratcher
1000+ posts
List Item Limit
Hi @awesome-llama let me suggest to import such list as an string and then split it and go adding to a list, it could take a while depending of the final list size and the amount of characters in such long string and the power of your PC.That would allow you possibly twice as much room, as variables don't have to be stored twice.
An example: https://scratch.mit.edu/projects/167222250/
I am thinking of encoding the data in images, as the images are not limited like the project.json. I might make a prototype soon
It looks sounds great, i hope you suceed.
Last edited by asivi (June 28, 2017 23:18:39)
- -Lite-
-
Scratcher
500+ posts
List Item Limit
Hi @awesome-llama let me suggest to import such list as an string and then split it and go adding to a list, it could take a while depending of the final list size and the amount of characters in such long string and the power of your PC.That would allow you possibly twice as much room, as variables don't have to be stored twice.
An example: https://scratch.mit.edu/projects/167222250/
I am thinking of encoding the data in images, as the images are not limited like the project.json. I might make a prototype soon
It looks sounds great, i hope you suceed.
My biggest concern is the compression.
Last edited by -Lite- (June 28, 2017 23:22:54)
- asivi
-
Scratcher
1000+ posts
List Item Limit
Let me suggest you go to advanced topics in order to get tips or advices about, sadly i can't help you because my lack of enough instrunction.
- asivi
-
Scratcher
1000+ posts
List Item Limit
@Kemek78, sorry for these unrelated responses. Hopefully you are a sympathetic guy. 

Last edited by asivi (June 28, 2017 23:32:38)
- Discussion Forums
- » Help with Scripts
-
» List Item Limit




