Somewhat excessive version checks

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgadmin-hackers <pgadmin-hackers(at)lists(dot)postgresql(dot)org>
Subject: Somewhat excessive version checks
Date: 2021-01-11 22:05:44
Message-ID: CABUevEyMFa0ti59E0CkZfcNDdo6tgtX4PZcXqrK54KzKFfVCBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi!

If I read the code correctly, pgadmin will (unless turned off) hit the
website to check the version.json file for updates *every time it
starts*.

Wouldn't it make sense to rate limit that to checking say once per 24
hours maximum? Or even 48?

It seems nobody needs the update *that* quickly, and AFAICT it does
call out to make that check synchronously on startup which means the
user is waiting.

And if/when doing that, it would be useful to include an
If-Modified-Since header on the request, so the server can just
respond with a tiny 304 reply when there is no update, which is going
to be the majority of the time. Or possibly even more efficiently,
create a custom etag and use If-None-Matches. If you make that etag be
say the version that the client has, it becomes very cheap to check
and you don't need to track any extra data.

--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Khushboo Vashi 2021-01-12 04:59:24 Re: Somewhat excessive version checks
Previous Message Stephen Frost 2021-01-11 17:42:21 Re: [pgAdmin4][Patch] - RM 5457 - Kerberos Authentication - Phase 1