luci-mod-admin-full: performance fix

*	uci:get replaced with direct access of value (functions has 3x better performance in that way)

Signed-off-by: Darius Joksas <jok.darius@gmail.com>
This commit is contained in:
Darius 2018-08-31 10:54:35 +03:00
parent 1b2065d0be
commit 7222bdabd4
2 changed files with 2 additions and 2 deletions

View file

@ -53,7 +53,7 @@ local function get_ifstate(name, option)
m.uci:foreach("luci", "ifstate", function (s)
if s.interface == name then
val = m.uci:get("luci", s[".name"], option)
val = s[option]
return false
end
end)

View file

@ -17,7 +17,7 @@ local update_interfaces = function(old_ifname, new_ifname)
local info = { }
m.uci:foreach("network", "interface", function(section)
local old_ifnames = m.uci:get("network", section[".name"], "ifname")
local old_ifnames = section.ifname
local new_ifnames = { }
local cur_ifname
local changed = false