I'm creating a basic asset managment HTA for my organization. When a user logs onto a domain computer, a logon script audits the machine for system information and stores it in a SQLDB.
A portion of the program displays asset attributes and the "as of" timestamp. Currently, I'm storing the attributes and timestamps in a dictionary object to make use of the key=>value context. My current code does what it needs to do in .0156 secs per asset. However, when you got over 1500 assets, it tends to slow things down.
Aside from limiting the number of assets displayed, can anyone offer some insight on speeding up this code? Or an alternative solution?
NOTE: An assets list of attributes is dynamic and created based on the information available at audit.
NOTE: My DB is an EAV and thus has little to no literal context (just numbers pointing at numbers ).
-Geates
A portion of the program displays asset attributes and the "as of" timestamp. Currently, I'm storing the attributes and timestamps in a dictionary object to make use of the key=>value context. My current code does what it needs to do in .0156 secs per asset. However, when you got over 1500 assets, it tends to slow things down.
Aside from limiting the number of assets displayed, can anyone offer some insight on speeding up this code? Or an alternative solution?
Code:
set dicItems = CreateObject("Scripting.Dictionary")
for j = 0 to ubound(arrRows) - 1
arrItem = arrRows(j)
if (arrItem(0) = intAssetPK) then
if (dicItems.Exists(arrItem(1)) = false) then
dicItems.Add arrItem(1), arrItem(2)
end if
end if
next
NOTE: An assets list of attributes is dynamic and created based on the information available at audit.
NOTE: My DB is an EAV and thus has little to no literal context (just numbers pointing at numbers ).
-Geates