Hacker News new | ask | show | jobs
by adobrawy 601 days ago
I'm not sure what operations you're doing that you're CPU bound.

When exporting Gmail and hitting an execution timeout, I would implement partitioning by date. Google Apps Script has a lock mechanism ( https://developers.google.com/apps-script/reference/lock ), and you can use user properties for progress tracking ( https://developers.google.com/apps-script/reference/properti...() ). Therefore, you can schedule a task every x minutes to pull x days of data and keep the cursor in user properties.

1 comments

Yeah that’s what I mean. Another trick I’ve used is building a web page that reloads itself because interactive calls have more generous quotas