[SOLVED] Speeding up Appwrite Cloud Function execution
- 0
- Web
- Databases
- Realtime
- Self Hosted
- Functions

FYI, im on cloud and i have a function that only creates a document after some validation. cold start takes 4s but after that it's .5s

Wait, I'm slightly confused, am i updating the front end appwrite
dependency or the functions dependency? (I'm new to this)

front end. that's what's calling the createExecution()
, right?

Yes, that makes sense.

I think what's really confusing me is that my package.json
tells me different to npm -v appwrite

Any idea on how to speed mine up? Is it just down to my code not being optimised or because it's JS

mine is a node function 🤷🏼♂️

Huh, what programming standards do you usually use?

you can try deleting your node_modules and then running npm i
again

btw this is the app https://places.pages.dev and the source code is here: https://github.com/stnguyen90/places/tree/main/appwrite-functions/create-comment

oh looks like im not fetching the user 😅

what you could also do is add log messages for the timing of things to see what parts are slow

and of course network latency (distance from the server) can play a factor too

I'll try speed up the code, but I'll also implement it so that the "Create" UI button is disabled whilst the promise is awaited, then once it's resolved, I can close the modal. (Inspiration... Appwrite Cloud lol)

That way it looks like something is happening in a UX sense

yep this is always a good idea

Woah

No idea how

barely changed the code but..

Wow that's fast!

Can I mark this as solved then? <:appwriterocket:823996226894692403>

Yeah I reckon so, I think that speed was an outlier

But, I have settled on awaiting the promise to resolve and just showing a loading animation on the create button whilst the function processes

Perfect

[SOLVED] Speeding up Appwrite Cloud Function execution
Recommended threads
- Attribute creation stuck at processing f...
Hey Appwrite community! 👋 I'm running into a persistent issue with my self-hosted Appwrite installation (v1.6.1) where programmatically creating attributes fo...
- Could not open input file: /usr/src/code...
I updated my selfhosted instance to `1.6.2` and the new service (`appwrite-task-stats-resources`) failed to start. The only log message I see is: ``` Could not ...
- A feature/Fix request
Whenever I use Appwrite then to see the items of document I've to click "columns" option and select those items that I want to see then if I refresh browser/pa...
