[pdm-devel] [PATCH datacenter-manager] ui: resource tree: use AsyncPool to cancel obsolete pending loads
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Apr 17 17:43:34 CEST 2025
Am 16.04.25 um 13:32 schrieb Dominik Csapak:
> Currently, if a new serach term is given, a new load will occur if the
> INPUT_BUFFER_MS time is reached. Any old in-flight API requests are not
> canceled, and might still arrive.
>
> To prevent that, use an AsyncPool and refresh that when the search term
> changes.
I forgot a few details here, but would it be possible to provide a wrapper
component for such things? I.e. fields where editing will trigger an API
request. As to me, it feels like this is an easy error to make for any
such fields, especially as it normally won't be noticed if tested locally
with <1ms network latency and the often relatively smaller (test) setups,
where the code querying the data in the backend needs only a few ms too.
But in any way not something that needs to delay applying this patch.
More information about the pdm-devel
mailing list