zulip / zulip-desktop

Zulip Desktop client for Mac, Windows and Linux.
https://zulip.com/apps
Apache License 2.0
855 stars 435 forks source link

A special mode that cache assets locally as much as possible. #1051

Open crlf0710 opened 3 years ago

crlf0710 commented 3 years ago

Sometimes I'm using this application in traffic billing network. So i wonder if there could a special mode that cache the web assets as much as possible locally, and only redownload them if absolutely required.

timabbott commented 3 years ago

Can you explain more what precisely you mean? Zulip already does employ standard caching that should result in the JS/CSS/etc. assets not being redownloaded except if the server is updated.

crlf0710 commented 3 years ago

Sure! In reality i do have observed many redownloads. I think some of them are related to server updates, some of them are related to browser proxy settings changes(not very certain in this case).

Actually what i want is this: If i'm using a traffic billing network(through a proxy), and the assets needs a redownload. I want to be able to choose that i don't want to download them now and quit the application (and use it again when i have switched to another network). It would be nice but not mandatory to able to download the assets as a package separately so i can deploy these files manually to my zulip-desktop application.

timabbott commented 3 years ago

Can you point to another app that has such a feature that we could study?

On Mon, Dec 14, 2020 at 8:03 PM Charles Lew notifications@github.com wrote:

Sure! In reality i do have observed many redownloads. I think some of them are related to server updates, some of them are related to browser proxy settings changes(not very certain in this case).

Actually what i want is this: If i'm using a traffic billing network(through a proxy), and the assets needs a redownload. I want to be able to choose that i don't want to download them now and quit the application (and use it again when i have switched to another network). It would be nice but not mandatory to able to download the assets as a package separately so i can deploy these files manually to my zulip-desktop application.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/zulip/zulip-desktop/issues/1051#issuecomment-745037757, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAU6NWRE7JD2T2S7TFUTOALSU3N2XANCNFSM4UZFD3SQ .

andersk commented 3 years ago

Do you have any details on what and/or how much is being redownloaded?

If you’re in streams with a lot of images, zulip/zulip#13088 could explain your redownloads.

If you’re in organizations with many thousands of users (like chat.zulip.org), it’s a known issue that we send quite a bit more data on initial page load than we probably need to: https://chat.zulip.org/#narrow/stream/3-backend/topic/subscribers.20perf/near/804765.

I think there’s some work we could do to split out the webapp frontend code from the server so that it could be bundled with the desktop app rather than downloaded from the server. I’d like this to happen some day, but it would be a significant undertaking. These downloads should already be cached, at least.