all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Jonas Theisen <j.theisen@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH manager v3 1/2] ui: resource tree: use 'diskuse' instead of calculating everytime
Date: Wed, 9 Sep 2026 11:40:27 +0200	[thread overview]
Message-ID: <ca5bfaef-27d8-4621-83a2-f1cdc11ef700@proxmox.com> (raw)
In-Reply-To: <84b54daf-e9e7-4a95-9f84-bae209bdbf34@proxmox.com>

On 9/9/26 11:29, Dominik Csapak wrote:
> On 9/9/26 11:22 AM, Jonas Theisen wrote:
>> On 1/23/26 09:12, Dominik Csapak wrote:
>>> the resource store has a field 'diskuse' which it calculates on update.
>>> Use that instead of calculating the value ourselves everytime.
>>>
>>> For change detection, we only need a resolution of 0.01 (since we want
>>> to use the percentage as integer) so check that the difference of 
>>> old and new
>>> is bigger than 0.9% .
>>>
>>> This works because we only overwrite the values in the treestore if
>>> anything changed, so multiple small changes to the diskuse will not be
>>> lost.
>>>
>>> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
>>> ---
>>> <snip>
>>
>> Applied and tested the patch on top of current pve-manager 9.2.18
>> Tested VM state changes and storage usage changes on a single node
>>
>> Problem: The tooltip style usage shown when hovering over a storage
>> reports the usage with two decimal places so per mille.
>> Due to the update logic only triggering on changes of 1% or greater,
>> a change smaller than that will cause the tooltip to get out of sync
>> from the actual usage reported by the status page.
>>
>
> thanks for checking!
>
> Ok so I think lowering the threshold to 0.01% difference probably
> does not have the effect I'd hoped for (i.e. not refreshing too often)
>
> So I'd either render the tooltip as whole percentage too, or
> use 0.1% in both cases as a middle ground.
>
> What do you think?

My personal preference would be to render the tooltip as
rounded percentage since in my head it is just a quick view option.
If the user wants the exact number, they can look into the status page.
>
>> -- 
>> Tested-by: Jonas Theisen <j.theisen@proxmox.com>
>





      reply	other threads:[~2026-09-09  9:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23  8:12 [pve-devel] [PATCH manager v3 1/2] ui: resource tree: use 'diskuse' instead of calculating everytime Dominik Csapak
2026-01-23  8:12 ` [pve-devel] [PATCH manager v3 2/2] ui: resource tree: only fire 'refresh' event when something changed Dominik Csapak
2026-08-31  9:26 ` [pve-devel] [PATCH manager v3 1/2] ui: resource tree: use 'diskuse' instead of calculating everytime Dominik Csapak
2026-09-09  9:22 ` Jonas Theisen
2026-09-09  9:29   ` Dominik Csapak
2026-09-09  9:40     ` Jonas Theisen [this message]

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=ca5bfaef-27d8-4621-83a2-f1cdc11ef700@proxmox.com \
    --to=j.theisen@proxmox.com \
    --cc=d.csapak@proxmox.com \
    --cc=pve-devel@lists.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