Why it takes so long to load 300,000 JSON tables via HTTP

any way to make this faster?


Compress the data. It is much slower to download non-compressed data than to download compressed data and decompress it afterwards.

it is from a google spreadsheet that is updated 3 times a minute

Try to set the Accept-Encoding header to gzip, deflate, br in your request and then check if the response you receive is compressed (if it is it will be much smaller in size and look like gibberish).

If that works then narrow down to a specific compression algorithm(for example gzip if it’s valid) and find a Roblox/lua library to do the decompression of that format.

how would i decode it or smth. jjj

compressed data is probably the best

you can also get some marginal speedup with --!strict --!native and --!optimize 2 tags. With native, you need correct type annotations and it works best when doing lots of calculations i think

A couple of things:

  1. Is there any reason you actually need 300,000 rows of data at once?

  2. The slow fetch time might actually be caused by whatever script you have in the cloud gathering all 300,000 rows from a spreadsheet.

Google Spreadsheets isn’t a database, and you shouldn’t treat it as one. It’d be worth it to create and understand an actual database using something like MongoDB or a similar.

Don’t tell that to me, I used google sheets as a simple database for my roblox stocks viewer.

It’s still running.

That’s like saying you drive a shopping cart to work because technically it has wheels.

300,000 rows in a Google Sheets “database” is insane. There is a clear reason your request has massive load times. Use a real database.

Uhhh…I’m not OP. My spreadsheet has 390 rows. It does not have insane load times, last I checked it took less than a second.

1 Like

Mine has 300,000 rows
:exploding_head: :exploding_head: :exploding_head:

Google is Free Gift Stickers - Find & Share on GIPHY

Yeah, that’s just insane. You should probably look into an actual database. With SQL. And not google sheets.

the hell is an SQL

SQL is a programming language for querying databases. It’s what you should be using.

are there any free services? like unlimited like google sheets

You can either run it yourself or find one with a free plan.

There might be a database that doesn’t use SQL but I believe SQL gives you more control over your queries (and chances are the “no SQL” solutions actually just use SQL under the hood, so you might as well just use it anyway lol).

Will it take more than 70 seconds to query?

it will take less than a second

that is literally the purpose of SQL

SQL is meant to be an easy way to quickly query large databases

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.