Skip to content

Commit 35aecd0

Browse files
committed
BUG: Remove m_UseOoc gate from Preferences::forceOocData getter and setter
The force_ooc_data preference is intended as an independent user toggle that overrides the "in-memory format" choice — "force every eligible array to OOC regardless of the selected large-data format." But both the getter and setter were gated on m_UseOoc, which is only true when the selected format is something other than the in-memory sentinel. Effect of the bug: when the user's large-data format was 'Simplnx-Default-In-Memory' (the default), toggling Force OOC in the Preferences dialog had zero effect. The setter silently dropped the new value (because the gate returned early), and even if the key had been persisted in a prior session, the getter would always return false. The OocDataIOManager format resolver already handles the (forceOoc=true, userChoseInMemory=true) case correctly — it returns 'HDF5-OOC' for every eligible array. The upstream gate in the preference class prevented that design from ever being reached. Removing the gate in both the getter and setter lets the toggle work as designed: when Force OOC is on, the format resolver routes every eligible array to OOC storage even if the user's format preference still says in-memory. Discovered while debugging a 6-second drag-drop-to-outline latency on a 25 GB dataset — the user had Force OOC on and the 2 GB large-data threshold set, but arrays were still being eagerly loaded into RAM. The root cause was this preference gate silently defeating the user's choice. Signed-off-by: Joey Kleingers <joey.kleingers@bluequartz.net>
1 parent 7d2ca70 commit 35aecd0

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

src/simplnx/Core/Preferences.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -323,19 +323,22 @@ bool Preferences::useOocData() const
323323

324324
bool Preferences::forceOocData() const
325325
{
326-
if(!m_UseOoc)
327-
{
328-
return false;
329-
}
326+
// The force_ooc_data flag is an independent user preference. It must not
327+
// be gated on m_UseOoc — the whole point of force_ooc_data is to override
328+
// the "in-memory format" choice when the user wants every eligible array
329+
// routed to OOC anyway. The OocDataIOManager format resolver explicitly
330+
// handles the (forceOoc=true, userChoseInMemory=true) case by returning
331+
// "HDF5-OOC". Gating here defeats that design and silently makes the
332+
// preference checkbox useless whenever the large-data format is set to
333+
// in-memory.
330334
return valueAs<bool>(k_ForceOocData_Key);
331335
}
332336

333337
void Preferences::setForceOocData(bool forceOoc)
334338
{
335-
if(!m_UseOoc)
336-
{
337-
return;
338-
}
339+
// See forceOocData() — the m_UseOoc gate is intentionally absent so a
340+
// user toggling the Force OOC checkbox in the Preferences dialog always
341+
// persists, regardless of the currently-selected large-data format.
339342
setValue(k_ForceOocData_Key, forceOoc);
340343
}
341344

0 commit comments

Comments
 (0)