Revert "Experiment with temporary us eof ETS table"
This reverts commit 2a106d0dc5
.
This commit is contained in:
parent
2a106d0dc5
commit
baf4ca252f
1 changed files with 8 additions and 10 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue