Database read / write operations are very slow when running on cloud functions (appwrite cloud). Each operation takes 2-3 seconds and overall function execution takea around 3-6 seconds.
- Function execution
{"startTime":"Mon Dec 11 2023 18:45:30 GMT+0000 (Coordinated Universal Time)"}
[[1] get document by id] "1462.120"
[[4] create document in db] "2804.059"
function duration: 4854.733 ms
{"executionTime":4853,"endTime":"Mon Dec 11 2023 18:45:34 GMT+0000 (Coordinated Universal Time)"}
- Function execution
{"startTime":"Mon Dec 11 2023 18:51:11 GMT+0000 (Coordinated Universal Time)"}
[[2] third party API call] "148.158"
[[3] create document in db] "994.708"
[[4] create document in db] "2002.438"
function duration: 3776.766
{"executionTime":3776,"endTime":"Mon Dec 11 2023 18:51:15 GMT+0000 (Coordinated Universal Time)"}
3.Function execution
{"startTime":"Mon Dec 11 2023 18:53:26 GMT+0000 (Coordinated Universal Time)"}
[[2] third party API call] "121.156"
[[3] create document in db] "1284.590"
[[4] create document in db] "2619.728"
function duration: 4729.293
{"executionTime":4729,"endTime":"Mon Dec 11 2023 18:53:30 GMT+0000 (Coordinated Universal Time)"}
Do you use relationships?
Yes.
Below durations are for creating child documents [[3] create document in db] "994.708" [[3] create document in db] "1284.590"
Below duration are for creating parent document with child document reference (not nested syntax) [[4] create document in db] "2804.059" [[4] create document in db] "2002.438" [[4] create document in db] "2619.728"
Below duration is for getting the child document [[1] get document by id] "1462.120"
ya...relationships can slow things down a bit..
Creating a document without relationship takes 300~400 ms for each write operation. Is this consistent with the benchmarks or expectations you have observed?
[PostService::[0] create document in db with no relations] "384.234" [PostService::[5] create document in db with no relations] "306.835"
hmmmm possibly yes...
Is it possible that the upcoming Pro plan could reduce these operation times?
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- Our Appwrite organization is suspended
Please give support regarding this , no app is working now , please solve my issue and give support , no one is replying in message section or email.
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...