scanning performance improvement
This commit is contained in:
@@ -31,7 +31,6 @@ function public.start(params)
|
|||||||
abort()
|
abort()
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
first_page = true,
|
|
||||||
params = params,
|
params = params,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,8 +57,6 @@ function abort()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function wait_for_results(k)
|
function wait_for_results(k)
|
||||||
local first_page = state.first_page
|
|
||||||
state.first_page = false
|
|
||||||
|
|
||||||
local ok
|
local ok
|
||||||
if current_query().type == 'bidder' then
|
if current_query().type == 'bidder' then
|
||||||
@@ -83,14 +80,13 @@ function wait_for_results(k)
|
|||||||
last_update = GetTime()
|
last_update = GetTime()
|
||||||
end)
|
end)
|
||||||
listener:start()
|
listener:start()
|
||||||
Aux.control.as_soon_as(function() return last_update and GetTime() - last_update > 3 or state and first_page and owner_data_complete end, function()
|
Aux.control.as_soon_as(function() return last_update and GetTime() - last_update > 3 or owner_data_complete end, function()
|
||||||
listener:stop()
|
listener:stop()
|
||||||
ok = true
|
ok = true
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
local t0 = GetTime()
|
return controller().wait(function() return ok end, k)
|
||||||
return controller().wait(function() return ok or GetTime() - t0 > 30 end, k)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function private.owner_data_complete()
|
function private.owner_data_complete()
|
||||||
|
|||||||
Reference in New Issue
Block a user