function widget:GetInfo()
  return {
    name      = "Visible Units",
    desc      = "Speedup for VisibleUnits() callin",
    author    = "Argh",
    date      = "August 23, 2009",
    license   = "Public Domain, or the least-restrictive rights of your country of residence",
    layer     = 0,
    enabled   = true -- loaded by default?
  }
end

local myTeam = Spring.GetLocalTeamID()
local GetDrawFrame = Spring.GetDrawFrame
local GetVisibleUnits = Spring.GetVisibleUnits
local ALL_UNITS       = Spring.ALL_UNITS
local frame, oldframe = 0,0
WG.visible = {}

function widget:DrawWorld()
	frame = GetDrawFrame()
	if frame > oldframe then
		--Spring.Echo("running now",frame)
		WG.visible = GetVisibleUnits(ALL_UNITS,myTeam,false)
		oldframe = frame + 5		
	end
end