[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
- Function issue
Hi,idk whats wrong with my function but i made some changes to the env var and made sure they saved then i redeployed it,but then after it redeeployed it asked ...
- Function issue
Hi,idk whats wrong with my function but i made some changes to the env var and made sure they saved then i redeployed it,but then after it redeeployed it asked ...
- general_route_not_found - Auth Guide
If you’ve just added a subdomain to your project, verified your DNS records, and confirmed your SSL certificate is working, but you're still hitting a `general_...