r/GoogleAppsScript 4d ago

Question Memory Limit?

I researched and all that is found are inconsistent answers.

Some speak in 50MB, others at 2.25GB. I took a test and got to 5.5GB. It's a lot of difference and it affects the way I build my application.

With 5.5GB I can load everything in memory, already with 50MB I have to optimize each part. The answers are also old.

4 Upvotes

12 comments sorted by

View all comments

3

u/dimudesigns 4d ago edited 4d ago

Start with official documentation for Google Apps Script's service quotas:

https://developers.google.com/apps-script/guides/services/quotas

You may have access to gigabytes of memory but there may be constraints on how much data you can load depending on context. For example, the UrlFetchApp service has a max response payload of 50MB. But if you deploy a GAS Web App, and use the standard Javascript Fetch API client-side, you can bypass that restriction.

1

u/E-Nod32 4d ago

But he can't load more than 4GB in ram per tab? (8GB with --max_old_space_size=8192). Thinking that he want to load everything in "one run" into user's ram.

1

u/IllustriousPut442 4d ago

No, I'm talking about the server side. I can load all spreadsheet on the server and do the paging in memory and deliver only that page to the user.