PDA

View Full Version : .PivotTable.PivotCache.MemoryUsed takes an aweful long time on large pivots.



JeffreyWeir
2013-05-28, 12:26 AM
Not a question but an observation, really.

PivotTable.PivotCache.MemoryUsed takes an aweful long time on large pivots.



Sub test()
Dim start As Date
start = Now()
Debug.Print "MemoryUsed: " & ActiveCell.PivotTable.PivotCache.MemoryUsed / 1000 & "kB"
Debug.Print "Time Taken: " & Format(Now() - start, "HH:MM:SS") & " seconds"
End Sub



MemoryUsed: 524.476kB
Time Taken: 00:00:05 seconds

5 seconds? For a half MB pivot? What the heck, Excel...are you using your fingers to count?

JeffreyWeir
2013-05-28, 02:16 AM
Ahh...it's specific to the pivot table i'm working on. Must have some bug in it somewhere, because I get the same result no matter what machine I try it with. However, if I extract all the data and make a new pivot, it takes no time at all.


There you go.