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
- How to use dart workspaces to deploy a f...
Hello, I'm developing a Flutter application and I would like to leverage dart pub workspaces to deploy a function with a dart runtime as advertised here : http...
- Migration from Cloud to Self-Hosted not ...
Hello Appwrite Community, I've got the problem, that when I try to migrate my Appwrite Project from the cloud to my self-hosted Appwrite, that an API Key is mi...
- I can't migrate my project from Appwrite...
I'm having an issue migrating my Appwrite project to a self-hosted instance. The problem is that I've exceeded my read rate limit (or database read limit), so I...