Memory Usage

Being diligent, you have brought up Task Manager when running AyaNova, and checked the amount of memory it’s executable is using.

Whoa, you say, it appears to be using quite a lot!

Actually, not really.

Back in AyaNova version 4, we added a chunk of code that would periodically force AyaNova to give up any unallocated memory because people unfamiliar with .net applications would email us asking why it was using so much memory when in fact it isn’t using that memory it’s just reserved based on what the user has been doing over time that has triggered memory allocation. Nearly all that memory except for (at a guess) around 8 to 25mb is actually free, it’s just held in reserve based on the usage pattern that led up to that point (i.e. previewing large reports, loading large lists without filtering them to restrict to top 100 etc). It’s there to be used in a moments notice.

We took out this code in version 7 because it was just cosmetic, didn’t actually do anything productive and in many cases would slow down AyaNova for a power user because AyaNova would have to request that memory all over again from the operating system.

Below is a good description found online explaining the situation:

[i]"TaskManager should not be used to measure the memory footprint of a .NET application.

When a .NET application starts, it asks the OS for a chunk of memory which it then segments to become the managed heap, stack, and large object heap. It is this total chunk of memory that TaskManager is reporting, which may or may not be completely used by .NET. Once a .NET application is given a chunk of memory, it will not release it until asked by the OS, which will only happen with the OS determines a need for more memory resources.

If you want to measure memory allocations, you need to look at the various performance monitor (PerfMon) counters."[/i]

In other words that memory is available to AyaNova but instantly freed up for the operating system if any is required.

.Net just like all modern windows operating systems from vista onwards doesn’t waste memory by leaving it sitting around unused, they try to take full advantage of any memory you have for best performance by a sophisticated system that ensures that while all free memory is used as much as is useful it’s also freed up instantly when needed by anything else.

Starting with AyaNova, the CTRL-ALT-e keyboard combination will instantly force AyaNova to free up all cached memory.
You can see this in action by:
[li]Run AyaNova
[/li][li]Open Task Manager, and you can see the memory used by AyaNova.exe. Minimize it.
[/li][li]Run something large, like view All Rows of the Service Workorders grid, or select to print preview a detailed report template for a large number of service workorder records
[/li][li]View your Task Manager again, note how the memory usage has gone up
[/li][li]Back to AyaNova, press CTRL-ALT-e, and view the Task Manager again
[/li][li]You will see that all cached memory used by AyaNova will be freed up, showing how much it actually is really using

Now again NOTE that you DO NOT have to manually free up the cached memory, your computer will do this automatically as the memory is needed elsewhere. Its just now there in case AyaNova needs it again, so AyaNova can do what it needs to do without having to request the memory again.