all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox Datacenter Manager development discussion
	<pdm-devel@lists.proxmox.com>
Subject: Re: [pdm-devel] [PATCH datacenter-manager] ui: resource tree: use AsyncPool to cancel obsolete pending loads
Date: Fri, 18 Apr 2025 08:10:38 +0200	[thread overview]
Message-ID: <c3a8b7c7-4adc-4b17-bd47-547b7b2e9a96@proxmox.com> (raw)
In-Reply-To: <bf7a59ee-077d-4d64-9536-e03263345985@proxmox.com>

On 4/17/25 17:43, Thomas Lamprecht wrote:
> 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.

mhmm, the AsyncPool is already the helper wrapper we should use for this,
we just have to apply it consistently.

The only special thing we do here is to replace the asyncpool with a new
one in the 'changed' method.

maybe a method for the async pool that takes additionally an id and
replaces the old future with the new one in case there is already
an in flight future with the same name?

(we use the asyncpool to handle multiple futures, so we'd need
to identify them)

> 
> But in any way not something that needs to delay applying this patch.
> 



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


  reply	other threads:[~2025-04-18  6:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16 11:32 Dominik Csapak
2025-04-17 15:43 ` Thomas Lamprecht
2025-04-18  6:10   ` Dominik Csapak [this message]
2025-04-18  7:29     ` Dominik Csapak
2025-04-18  7:47 ` Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c3a8b7c7-4adc-4b17-bd47-547b7b2e9a96@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pdm-devel@lists.proxmox.com \
    --cc=t.lamprecht@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal