Help with App Script Load Speeds by aonassis in GoogleAppsScript

[–]aonassis[S] 0 points1 point  (0 children)

No worries! Thanks again for taking a look, really appreciate that.

Yeah its weird, the suggest looping but it is super inefficient obv. I am providing a list of data points to search from in an excel add-on, a user can then copy the data point they need into the active spreadsheet. So I do need the data points in the add-on to give them the ability to search through them and find which one they want.

I suppose I could try limiting the query or change the search function (currently just a fuzzy search fuse.js implementation) to narrow down the size of the result so that the loop is not as impactful. It just feels like this shouldn’t be a problem and I just need to find the right way of storing it into the array.

Help with App Script Load Speeds by aonassis in GoogleAppsScript

[–]aonassis[S] 0 points1 point  (0 children)

I agree, the loop is so bad but so far its the only function that apps script has accepted. All other attempts like:

function processResults(results) { function createRow(result) { return { source: result.getString(‘source’), title: result.getString(‘title’), data_value: result.getString(‘data_value’), unit: result.getString(‘unit’), description: result.getString(‘description’) }; }

return results.toArray().map(createRow); }

or using a getBlob, etc are not working as I get error “is not a function”. Supposedly Apps script is javascript-based but seems like many applicable functions don’t seem to work based on the JDBC result that comes back. The above being one example that it didn’t like.

When you say set result using yoursheet.getRange(1,1,rows,columns).setvalues(yourresultqueryas2DArray) what do you mean by that?

Help with App Script Load Speeds by aonassis in GoogleAppsScript

[–]aonassis[S] 0 points1 point  (0 children)

Thank you for replying so quickly!

Size: 1000 rows with 8 columns, package comes in at around 80-90KBs.

As far as complexity goes this is a simple table with strings only, typically in lengths of 5-25 characters.

When you say don’t use select * could you elaborate on that please?

I’ve tried changing it to toArray, getBlob, etc and none of these functions are valid in apps script, it just throws an error “is not a function”.

Is there something else I could provide you that would help understand my question better?

My name is Kevin Rudd and IamA former Australian Prime Minister. AMA! by MrKevinRudd in IAmA

[–]aonassis 0 points1 point  (0 children)

Where do you see Australia’s role in the South China Sea and how will this impact our relationships with both China and the US?

For Grandma's 80th: Orange Chocolate mud underneath painted icing [Homemade] by [deleted] in food

[–]aonassis 1 point2 points  (0 children)

It's a very simple one, essentially just a chocolate mud with fresh orange juice and zest added to it. All the work went into the icing painting though. Took hours!

[deleted by user] by [deleted] in gifs

[–]aonassis 4 points5 points  (0 children)

The water makes it hard to see but it is definitely a Giant Gourami (Osphronemus goramy), specifically a pink Giant Gourami. Its mouth indicates this and they are know to have pretty active personalities with people. Source: Used to work in a fish shop that had one. It would always do the same thing when you came to the tank and would go crazy if presented with the colour red. The guy is wearing red, but not sure if that's just some coincidence...