Hi, I'm trying to, figure out why fetching a large amount of documents is so long. I suspect a network bottleneck as using the CLI locally is way faster. Doing so I checked my Chrome dev tools and I can't find any Content-encoding: zip
or so. So my question: is there any compression done in Appwrite http responses? If not, is there a way to enable it? Thx
we use brotli: π§
are you fetching in your app or Appwrite Console?
In my app which is a PWA, so Chrome involved in the process
Here's another test from my (react) web app:
Hmm, strange. My response contains no "Content-encoding"...
while others do present this "Content-encoding: br"
The requests missing this field are big queries with limit()
and offset()
I reduced the limit()
from 5000
down to 100
and I've the Content-encoding: br
field. Any clue?
lol you shouldn't be fetching so many things at once π
Ah? This is bad news for my app...
why can't you paginate?
No, I need offline feature, this is a PWA and my users may be offline and still be able to use the app.
still....why can't you paginate?
Except the compression issue, all is performing well like this.
Paginate? The fetch of my 40K documents?
I'm currently fetching 100 at a time... so 400 requests. Takes way longer.
if you're using limit + offset, can you do them concurrently?
What's the time difference between 1 request of limit(5000) and 50 request of limit (100)? You might even be able to turn that for a better result
I found it. we won't compress if it's too big: https://github.com/utopia-php/framework/blob/702c945a2b83f9ecfe57a01d4eb02c779f26f99b/src/Response.php#L485-L489
because it's chunked instead...
OK, thanks for your answer. I see 2MB is the limit, so I gonna tweak my request settings to get them under the line. Thx.
Recommended threads
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...
- custom domain with CloudFlare
Hi all, it seems that CloudFlare has blocked cross-domain CNAME link which made my app hostname which is in CloudFlare, unable to create a CNAME pointing to clo...
- 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...