Hi Everyone,
I'm trying to diagnose/troubleshoot an issue I've got in an Excel 2010 spreadsheet that we use to display data on LCD TV's (wallboards).
As a basic overview of the spreadsheet's function:
- the spreadsheet is run in full screen mode and uses VBA macros to perform the below functions automatically behind the scenes
- updated data is available via an external text file every 10 seconds
- therefore every 10 seconds, the macro refreshes the query table on the 'Raw Data' tab with 44 rows and 21 columns of data
- on a second tab called 'Sort Data', the raw data (21 columns) is referenced/linked, and in column 22 a sort value is calculated (by formula) allocating a number from -99 to 999999
- the 22 columns are sorted by the macro, with column 22 used as the key sorting from largest to smallest
- data is displayed on a third tab 'Display Data' (also referenced, this time with formatting to make it present on a TV).
I've had no issues with this setup since we started using it in Excel 2003 & Windows XP for around 4 years now. The spreadsheet has always been responsive, memory allocation always stayed around the same (around 50,000-60,000k in Task Manager), and could run for days (even weeks) without any issue.
The troubles have begun since we moved to Excel 2010 and Windows 7. When the spreadsheet is first started, it works just as well as it always had. But progressively over a couple of hours, the macro cycle begins to slow to a crawl (taking around 1-2 minutes to cycle rather than 10 seconds) and eventually we have to close and restart Excel to get it going for a little while again.
Looking at the memory allocation in task manager, starting the spreadsheet is around 50-60 K and every cycle of the macro seems to add around 10-30k, and we eventually see the slow down when it starts approaching 100,000K. I'm sure it's not a RAM/memory issue as there's plenty of capacity left available - but this slight regular increase must be relating to something staying active or in memory. Just closing the spreadsheet only doesn't clear the memory allocation, only closing Excel does.
Even if I open another spreadsheet (unrelated to the first), that seems to be affected too when sorting or using Excel in general (processing time seems to be longer). The only way to clear is to close Excel completley. The Excel.exe process stays running for another 20-120 seconds before finally ending.
I've spent the better part of this month pulling the entire spreadsheet apart, and believe I have narrowed down the cause to the 'sorting' of a range that includes formulas. I've created a more basic spreadsheet to just test the sorting part only that has 'RawData' on on tab, and 'SortData' on the second tab that includes a basic set of formulas. Then when sorting (using either a macro, auto filter or manual sort), it seems I can make the memory allocation increase by 5-15k after every 1-3 sorts and keeps going up.
Other things I've researched and tried (without sucess) include:
- making sure I'm not reference entire columns or large number ranges in formulas
- enabled 'forcefullcalculation' and performed 'calculatefullrebuild'
- before the macro runs, always disable screen-updating, set calculation to manual, disable alerts & events - run the code, then restore those functions
- attempted disabling 'multi-thread' processing & calcuations
- changed the registry setting to '0' for undo functions
- making sure any object references used in the macro are set to 'nothing' at the end of the cycle
- checked that we're running Office SP1 that has already included the hotfix regarding sorting data causing memory allocation issues.
- making sure any PivotTables don't remember missing items and don't save source data
Has anyone else ever heard of this? Is there some other form of 'Sorting Cache' that is keeping track in Excel 2010 that I need to clear?
I'm trying to diagnose/troubleshoot an issue I've got in an Excel 2010 spreadsheet that we use to display data on LCD TV's (wallboards).
As a basic overview of the spreadsheet's function:
- the spreadsheet is run in full screen mode and uses VBA macros to perform the below functions automatically behind the scenes
- updated data is available via an external text file every 10 seconds
- therefore every 10 seconds, the macro refreshes the query table on the 'Raw Data' tab with 44 rows and 21 columns of data
- on a second tab called 'Sort Data', the raw data (21 columns) is referenced/linked, and in column 22 a sort value is calculated (by formula) allocating a number from -99 to 999999
- the 22 columns are sorted by the macro, with column 22 used as the key sorting from largest to smallest
- data is displayed on a third tab 'Display Data' (also referenced, this time with formatting to make it present on a TV).
I've had no issues with this setup since we started using it in Excel 2003 & Windows XP for around 4 years now. The spreadsheet has always been responsive, memory allocation always stayed around the same (around 50,000-60,000k in Task Manager), and could run for days (even weeks) without any issue.
The troubles have begun since we moved to Excel 2010 and Windows 7. When the spreadsheet is first started, it works just as well as it always had. But progressively over a couple of hours, the macro cycle begins to slow to a crawl (taking around 1-2 minutes to cycle rather than 10 seconds) and eventually we have to close and restart Excel to get it going for a little while again.
Looking at the memory allocation in task manager, starting the spreadsheet is around 50-60 K and every cycle of the macro seems to add around 10-30k, and we eventually see the slow down when it starts approaching 100,000K. I'm sure it's not a RAM/memory issue as there's plenty of capacity left available - but this slight regular increase must be relating to something staying active or in memory. Just closing the spreadsheet only doesn't clear the memory allocation, only closing Excel does.
Even if I open another spreadsheet (unrelated to the first), that seems to be affected too when sorting or using Excel in general (processing time seems to be longer). The only way to clear is to close Excel completley. The Excel.exe process stays running for another 20-120 seconds before finally ending.
I've spent the better part of this month pulling the entire spreadsheet apart, and believe I have narrowed down the cause to the 'sorting' of a range that includes formulas. I've created a more basic spreadsheet to just test the sorting part only that has 'RawData' on on tab, and 'SortData' on the second tab that includes a basic set of formulas. Then when sorting (using either a macro, auto filter or manual sort), it seems I can make the memory allocation increase by 5-15k after every 1-3 sorts and keeps going up.
Other things I've researched and tried (without sucess) include:
- making sure I'm not reference entire columns or large number ranges in formulas
- enabled 'forcefullcalculation' and performed 'calculatefullrebuild'
- before the macro runs, always disable screen-updating, set calculation to manual, disable alerts & events - run the code, then restore those functions
- attempted disabling 'multi-thread' processing & calcuations
- changed the registry setting to '0' for undo functions
- making sure any object references used in the macro are set to 'nothing' at the end of the cycle
- checked that we're running Office SP1 that has already included the hotfix regarding sorting data causing memory allocation issues.
- making sure any PivotTables don't remember missing items and don't save source data
Has anyone else ever heard of this? Is there some other form of 'Sorting Cache' that is keeping track in Excel 2010 that I need to clear?