The following operation creates an ETS table and inserts 300,000 items of data.
Blockquote
T = ets:new(tttt, [named_table]).
_ = [ets:insert(T, {O, O}) || O ← lists:seq(1, 300000)].
ets:info(T).
[{id,#Ref<0.2452677512.3532259330.103184>},
{decentralized_counters,false},
{read_concurrency,false},
{write_concurrency,false},
{compressed,false},
{memory,2401625},
{owner,<0.87.0>},
{heir,none},
{name,tttt},
{size,300000},
{node,‘aa@192.168.2.43’},
{named_table,true},
{type,set},
{keypos,1},
{protection,protected}]
Then the erL shell query occupies more than 2M memory, but the observer query occupies more than 18M memory. From the perspective of the operating system, it also occupies more than 18M memory
Feels like a lot of wasted space