Skip to content

Compute and store node cache folder size in node status; display in Node Editor header#3012

Draft
Copilot wants to merge 5 commits intodevelopfrom
copilot/compute-node-cache-storage-size
Draft

Compute and store node cache folder size in node status; display in Node Editor header#3012
Copilot wants to merge 5 commits intodevelopfrom
copilot/compute-node-cache-storage-size

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

Description

At the end of node computation, computes the total size of all files in the node's cache folder and stores it as an integer KB value in the node status file. The value is displayed in human-readable format (e.g. 1.5G, 45M, 234K) in the Node Editor header, next to the computation time.

Features list

  • Compute cumulative cache folder size (integer KB) at the end of node computation and store in NodeStatusData.storageSizeKB, persisted to the node status file.
  • Expose storageSizeKB as a Qt property on BaseNode for QML data-binding.
  • Add Format.KB2SizeStr(KB) utility in format.js for compact human-readable size strings (1.5G, 45M, 234K).
  • Display cache size in the Node Editor header bar next to the computation time label, visible once computation completes.

Implementation remarks

Computation placement: _computeCacheFolderSize() is called explicitly in NodeChunk.process() after upgradeStatusTo(executionStatus), only when getGlobalStatus() returns a terminal state. upgradeStatusFile() remains a pure write/sync operation. For multi-chunk nodes this naturally fires only when the last chunk finishes.

QML notification: nodeStatusChanged is emitted after storageSizeKB is set so QML re-reads the property. The property uses notify=nodeStatusChanged (independent from globalStatusChanged which fires earlier in the same code path).

Size formatting: KB2SizeStr uses parseFloat(x.toFixed(1)) so trailing .0 is stripped — 2.0 renders as 2G, not 2.0G.

// nodeStatus file excerpt after SUCCESS
{
  "nodeName": "FeatureExtraction_1",
  "status": "SUCCESS",
  "storageSizeKB": 4096
}
Original prompt

At the end of the node computation, compute the storage size of all the files in the node cache folder and store it in the node status information.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add storage size computation for node cache files Store node cache folder storage size in node status at end of computation Feb 23, 2026
Copilot AI requested a review from fabiencastan February 23, 2026 22:57
Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
Copilot AI changed the title Store node cache folder storage size in node status at end of computation Compute and store node cache folder storage size in node status at end of computation Feb 24, 2026
Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
Copilot AI changed the title Compute and store node cache folder storage size in node status at end of computation Compute and store node cache folder size in node status; display in Node Editor header Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants