Max size for data sets?

Helping a student with a passion project. Is there a max size for data sets? In the past we have found some of the included sets to cause some lag.

Hello @cedgar I am so glad that you are able to help students with their passion projects. Keep it up :clap: Here are my thoughts:

There isn’t a strict “max size” for data sets on Code.org, but yeah, the bigger the data set, the more likely it is to slow things down. The main reason for that is that browsers have limited resources, and loading or processing a huge amount of data at once can really cause lag, especially if you’re visualizing or updating things on the screen constantly. also look for the computer specs, if the computer with low processors(older computers) might also have a bit of an impact.

If you’re noticing lag, here are a few things that might help:

  1. Trim Down the Data: See if you can reduce the data size. Maybe use just a sample of it (like 1 out of every 10 points) instead of the full set. You don’t always need everything, especially if some of it is redundant.
  2. Load Data in Chunks: Instead of pulling in the whole data set at once, try loading it piece by piece. This can help prevent the browser from getting overwhelmed when the page first loads.
  3. Limit On-Screen Data: If you’re displaying a lot of data on the screen, try reducing how many points or shapes you show at one time. Maybe zoom in on a smaller section of the data, or aggregate it into fewer points.
  4. Optimize Your Code: Check your loops or any part of the code that might be doing a lot of repetitive work. Sometimes, simple tweaks in how you process the data can make a big difference.

I hope this is helpful :slight_smile:

-Abi

2 Likes