Hi all,
So I am a fan of efficiency and so jgstews articles such as below are of great interest to me
I have created a web report that with some post processing gets turned into a pipe separated report.
I have hated it from day dot but happy obviously that it works. I have been meaning to find out how to optimize it for a while but every time I try I am hopelessly stuck.
I am also now experiencing a problem not only with speed but with my post processing vb script running out of memory due to large data (800MB+) from web reports.
So In theory It would be ideal to just do this right now and skip post processing altogether.
I am in particular very fond of this example:
Option #6 takes ~0.022 seconds in my environment:
(name of it, id of it) of items 1 of (it, bes computers) whose(name of item 1 of it is contained by item 0 of it) of ( set of unique values whose (multiplicity of it > 1) of names of bes computers )
I would like to somehow replicate that to the below code I am using now but all attempts (many days worth…) are not working for me. Is it possible? Would be thankful if someone can guide me through or assist. I seem to not understand how the multiples of items stringed together work and how to transfer to my example.
My code, that works but is… not efficient in any way
<?relevance ( names of applicable computers whose (operating system of it contains "Win7" OR operating system of it contains "Win8" OR operating system of it contains "Win10") of it, (if (exists cve id list of it) then (if (cve id list of it != "") then (concatenation ";" of substrings separated by "," of (cve id list of it)) else ("N/A")) else ("N/A")) & "|" & (if (exists source id of it) then (if (source id of it != "") then (concatenation ";" of substrings separated by "," of (source id of it)) else ("N/A")) else ("N/A")) & "|" & (if (exists source release date of it) then (if (source release date of it as string != "") then ((month of it as two digits & "/" & day_of_month of it as two digits & "/" & year of it as string) of date(local time zone) of ((source release date of it as string & " 00:00:00 +1000") as time)) else ("N/A")) else ("N/A")) & "|" & (if (exists source severity of it) then (if (source severity of it as string != "") then (source severity of it) else ("N/A")) else ("N/A")) & "|" & (if (exists category of it) then (if (category of it as string != "") then (category of it) else ("N/A")) else ("N/A")) & "|" & (concatenation "" of substrings separated by "," of (names of it as string)) ) of fixlets whose ( fixlet flag of it = true and globally visible flag of it = true and exist applicable computers of it and source id of it starts with "KB" and name of it as string contains "MS" and name of it as lowercase does not contain "corrupt patch" and name of it as lowercase does not contain "superseded" ) of bes sites whose (name of it = "Enterprise Security")?>
Again any help would be super appreciated.
Thanks!
Mario