From 2d7874320731333922927e0cae972dfc2c4fffd7 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Wed, 24 Feb 2016 08:56:13 +0100 Subject: [PATCH] scanning performance improvement --- post_frame.lua | 1 + scan.lua | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/post_frame.lua b/post_frame.lua index 73a8299..df6f41a 100644 --- a/post_frame.lua +++ b/post_frame.lua @@ -778,6 +778,7 @@ function private.refresh_entries() private.status_bar:set_text('Scanning auctions...') Aux.scan.start{ + no_wait_owner = true, queries = { query }, on_page_loaded = function(page, total_pages) private.status_bar:update_status(100 * (page + 1) / total_pages, 0) -- TODO diff --git a/scan.lua b/scan.lua index 130cfc1..a6c3ece 100644 --- a/scan.lua +++ b/scan.lua @@ -80,16 +80,19 @@ function wait_for_results(k) last_update = GetTime() end) listener:start() - Aux.control.as_soon_as(function() return last_update and GetTime() - last_update > 3 or owner_data_complete end, function() + Aux.control.as_soon_as(function() return last_update and GetTime() - last_update > 5 or owner_data_complete end, function() listener:stop() ok = true end) end - + return controller().wait(function() return ok end, k) end function private.owner_data_complete() + if state.params.no_wait_owner then + return true + end local count, _ = GetNumAuctionItems(current_query().type) for i=1,count do local auction_info = Aux.info.auction(i, current_query().type)