Just having come to my seneses, unless you are looking up the information in-game during a session, you can run the process just once at PLAYER_LOGOUT.
Lua Code:
local function PLAYER_LOGOUT()
AddonListDB = {}
local addcount = GetNumAddOns()
for i = 1,addcount do
local name, title, notes, loadable, reason, security, newVersion = GetAddOnInfo(i)
loaded, finished = IsAddOnLoaded(i)
AddonListDB[i] = {
Title=title,
Loaded=loaded or false
};
end
end
local JWFrame = CreateFrame("Frame");
JWFrame:RegisterEvent("PLAYER_LOGOUT");
JWFrame:SetScript("OnEvent", PLAYER_LOGOUT)