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
- MariaDB refuses to connect to appwrite
Earlier, I tried updating my Appwrite version from 18.1.x to the latest release because my Flutter package required it to function properly. I used the official...
- Custom API domain is unreachable
Earlier my custom api domain was working fine. Now it seems to be offline without a trace a few hours later. I didn't change anything, all the relevant DNS reco...
- "Invalid console fingerprint" when unpau...
I've tried logging out and logging back in, still can't figure out why this is happening.