mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Removed useless imports in lua code upping the memory usage
This commit is contained in:
parent
2f76c9bf4b
commit
dbf4bf2a2b
53 changed files with 2981 additions and 3255 deletions
|
|
@ -5,20 +5,9 @@
|
|||
dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
-- Hack to avoid include loops
|
||||
if (pragma_once_callback_utils == true) then
|
||||
tprint(debug.traceback())
|
||||
-- avoid multiple inclusions
|
||||
return
|
||||
end
|
||||
|
||||
pragma_once_callback_utils = true
|
||||
|
||||
local os_utils = require "os_utils"
|
||||
|
||||
|
||||
local callback_utils = {}
|
||||
|
||||
local clock_start = os.clock()
|
||||
|
||||
-- ########################################################
|
||||
|
|
@ -251,6 +240,7 @@ end
|
|||
-- Iterates each device on the ifname interface.
|
||||
-- Each device is passed to the callback with some more information.
|
||||
function callback_utils.foreachDevice(ifname, callback)
|
||||
require "label_utils"
|
||||
interface.select(ifname)
|
||||
|
||||
local devices_stats = callback_utils.getDevicesIterator()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue