[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
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...
- Custom emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...