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
- Selfhost - Starting Docker containers fa...
I am stuck at installing appwrite. Specifically, the containers dont want to start up. The images are downloaded and ready. Dockhand is reporting containers st...
- It says domain already used but I have d...
I accidentally deleted the project in which I used my domain originally (orexia.app) from name.com. Now I am trying to add it to a different project and it says...
- Is this normal in the self host custom d...
when i try to add custom domain to the project did not see this in 1.8.0 ok when pressed the retry it says "DNS verification failed with resolver 8.8.8.8. Domai...