Revert "Experiment with temporary us eof ETS table"

This reverts commit 2a106d0dc5.
This commit is contained in:
martinsumner 2016-12-13 20:24:29 +00:00
parent 2a106d0dc5
commit baf4ca252f

View file

@ -102,16 +102,14 @@ check_index(Hash, L0Index) ->
to_list(Slots, FetchFun) ->
SW = os:timestamp(),
Tab = ets:new(temp_l0, [private, ordered_set]),
SlotList = lists:seq(1, Slots),
lists:foreach(fun(Slot) ->
Tree = FetchFun(Slot),
L = leveled_skiplist:to_list(Tree),
ets:insert(Tab, L)
end,
SlotList),
FullList = ets:tab2list(Tab),
true = ets:delete(Tab),
SlotList = lists:reverse(lists:seq(1, Slots)),
FullList = lists:foldl(fun(Slot, Acc) ->
Tree = FetchFun(Slot),
L = leveled_skiplist:to_list(Tree),
lists:ukeymerge(1, Acc, L)
end,
[],
SlotList),
leveled_log:log_timer("PM002", [length(FullList)], SW),
FullList.