Skip to content

Commit c9e3152

Browse files
Seungwoo321claude
andcommitted
fix: correct PivotData memoization to detect data changes
**Root Cause Identified:** - pivotDataKey only checked dataLength, not actual data changes - Same length data (1000 records) resulted in no PivotData recreation - Old data accumulated without cleanup for 800+ refreshes **Fix:** - Include actual data reference in pivotDataKey computation - Now detects when new data array is generated (same length, different content) - Forces PivotData recreation and cleanup on each refresh **Expected Result:** Memory should reset to baseline (~43MB) on each refresh instead of accumulating 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b91d6f1 commit c9e3152

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/pivottable-ui/VPivottableUi.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@ const unusedAttrs = computed(() => {
330330
})
331331
332332
// Use computed with proper memoization to prevent unnecessary PivotData recreations
333-
// Only recreate when critical properties change
333+
// Include data reference to detect actual data changes, not just length
334334
const pivotDataKey = computed(() =>
335335
JSON.stringify({
336-
dataLength: state.data?.length || 0,
336+
dataReference: state.data, // Include actual data reference to detect changes
337337
rows: state.rows,
338338
cols: state.cols,
339339
vals: state.vals,

0 commit comments

Comments
 (0)