[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
- functions domain error
I cannot set up the domain for function Iβm trying to add the domain api.example.com I can only use Cloudflare as the DNS provider because my domain provider do...
- Introducing new string column types made...
Adding new string types is hugely bennificial! Unfortunately it made the current column types not editable to change their types to the new longer field types.
- there is critical problem in this part
when user update the integer and double both get error not update or upload