performance
After macro, if I run the macro once more, the performance is slowed.... why... ctrl+alt+del, in wnd task manager, for the first time, Mem Usage of excel 20,000kb , but after macro runnig, the value is 29,000kb...... How can I the value back return 20,000....?? by the way, after excel application is closed, if the excel file is opened again, the Mem is 20,000 originally, and the macro run velociy is fast... but, once more the macro running, the velocity is slowed..... *** Sent via Developersdex http://www.developersdex.com *** |
performance
There could be more reasons, but one is that there are variables in the code
that store values and retain those values as part of the file until the file is closed. This causes the file size to increase by the amount of bytes required to store the variable values. Setting varibles to nothing at the end of the procedure can help reduce that effect. "x taol" wrote: After macro, if I run the macro once more, the performance is slowed.... why... ctrl+alt+del, in wnd task manager, for the first time, Mem Usage of excel 20,000kb , but after macro runnig, the value is 29,000kb...... How can I the value back return 20,000....?? by the way, after excel application is closed, if the excel file is opened again, the Mem is 20,000 originally, and the macro run velociy is fast... but, once more the macro running, the velocity is slowed..... *** Sent via Developersdex http://www.developersdex.com *** |
performance
That is the job of garbage collection.
-- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "JLGWhiz" wrote in message ... There could be more reasons, but one is that there are variables in the code that store values and retain those values as part of the file until the file is closed. This causes the file size to increase by the amount of bytes required to store the variable values. Setting varibles to nothing at the end of the procedure can help reduce that effect. "x taol" wrote: After macro, if I run the macro once more, the performance is slowed.... why... ctrl+alt+del, in wnd task manager, for the first time, Mem Usage of excel 20,000kb , but after macro runnig, the value is 29,000kb...... How can I the value back return 20,000....?? by the way, after excel application is closed, if the excel file is opened again, the Mem is 20,000 originally, and the macro run velociy is fast... but, once more the macro running, the velocity is slowed..... *** Sent via Developersdex http://www.developersdex.com *** |
All times are GMT +1. The time now is 05:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com