Hello,
I just wanted to check if someone has come a better way to do cross-mapping of data from multiple WMI Classes? I have been using the following design on some occasions and it does work when it is 1-2-3 classes but I have an use case where I need to do 4 and that just goes off and never completes (with 3 classes it takes about 100 seconds which is bad enough but at least completes)…
Queries to retrieve data from 1st WMI Class:
((if exists string value of properties "Field1" of it then string value of properties ("Field1") of it else "<none>"), (if exists string value of properties "Field2" of it then (it as integer) of string value of properties ("Field2") of it else 0), (if exists string value of properties "Field3" of it then (it as integer) of string value of properties ("Field3") of it else 0)) of (select objects ("Field1,Field2,Field3 from SomeClass") of WMI)
Queries to retrieve data from 2nd WMI Class:
((if exists string value of properties "Field1" of it then string value of properties ("Field1") of it else "<none>"), (if exists string value of properties "Field2" of it then (it as integer) of string value of properties ("Field2") of it else 0), (if exists string value of properties "Field3" of it then (it as integer) of string value of properties ("Field3") of it else 0)) of (select objects ("Field1,Field2,Field3 from SomeClass2") of WMI)
Basic structure of the above into one and adding the cross-mapping from the data:
(item a of item 0 of it & " - " & item b of item 1 of it) of (1st Query, 2nd Query) whose (item x of item 0 of it = item y of item 1 of it)
I would have thought that based on the structure it just evaluates each of the queries once and then just uses the tuple result for the mapping/displaying but based on actual runtimes, it seems to be nesting the executions of each and essentially it is resulting in exponentially growing runtimes which at WMI class 4 are just no longer manageable. Question is whether there is a better way to structure it?