I have an analyses to get the size of the C:\users folder. It takes some of my servers a VERY long time to process it according to the client evaluation. It’s not been noticeably causing any issues and it only evaluates it once a day.
Any ideas on speeding it up?
if (exists folder “C:\users”) then ((it / 1024 / 1024 / 1024) of sum of sizes of descendants of folders “C:\users” as string & " GB") else “N/A”
In addition to taking a long time, today I realized that the value being returned is often incorrect. I am seeing a number of servers with 100gb C:\ having the size of C:\users reported from 120gb to as high as 300gb.
Agreed. Iterating over so many directories of the filesystem will take time.
In general, for these sorts of situations, we typically recommend leveraging recurring actions to output the desired data to a file, and then have a property return the output. You can still leverage relevance to achieve this (via relevance substitution), or you can leverage native OS commands as well. In either case, it should be a lot faster, better controlled (i.e. you can better control when the data is collected), and it can be made to not impact the Client’s eval loop (i.e. “run” execution commands/methods rather than “wait”)
If you want examples, we can certainly provide some…
I do wish the client had an inspector that would return a value similar to the OS when you check disk space. Off hand, it wouldn’t seem to hard and would be a good benefit.
I’ll put something in our backlog to convert our Analyses.