<div dir="ltr">Hi Sergei,<div class="gmail_extra"><br><div class="gmail_quote">On 2 January 2018 at 20:51, Сергей Прохоров <span dir="ltr"><<a href="mailto:seriy.pr@gmail.com" target="_blank">seriy.pr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="gmail-"></span><div>Are you sure it works like this?</div><div>Because, as far as I know, ETS data resides in a separate chunk of memory. Is the idea that ETS will only contain references to original shared binary, but not the binary itself?</div><div>Have you checked / measured that it really works that way and not copying whole database to / from ETS for each lookup?</div></div></blockquote><div><br></div><div><div>I didn't benchmark it. I looked around on the web for past
discussions on the matter and found a previous thread[1] discussing this
particular problem, in which it was stated that a 6 word overhead would
be incurred for every lookup. <br><br>As we're talking about blobs
amounting to potentially dozens of megabytes, I felt very comfortable
with such an overhead. I took those statements as likely being the
truth, as the people involved seemed to know what they were talking
about, but I'd be the first to restructure the current architecture if
shown a better way.<br><br></div><div>Cheers,<br></div><div><br></div>[1]: <a href="http://erlang.org/pipermail/erlang-questions/2016-October/090712.html" target="_blank">http://erlang.org/pipermail/<wbr>erlang-questions/2016-October/<wbr>090712.html</a> <br></div></div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Guilherme<br></div></div></div></div></div></div>
</div></div>