This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-03
Channels
- # aleph (2)
- # announcements (6)
- # babashka (6)
- # beginners (106)
- # biff (8)
- # clara (24)
- # clj-kondo (10)
- # clj-otel (4)
- # cljdoc (2)
- # clojure (54)
- # clojure-conj (3)
- # clojure-europe (85)
- # clojure-norway (54)
- # clojure-uk (3)
- # clojurescript (27)
- # community-development (2)
- # data-science (1)
- # datahike (2)
- # datomic (11)
- # deps-new (67)
- # emacs (4)
- # graalvm (15)
- # hyperfiddle (11)
- # introduce-yourself (1)
- # lsp (6)
- # malli (30)
- # midje (4)
- # nrepl (13)
- # off-topic (86)
- # polylith (7)
- # releases (2)
- # sql (10)
The yamlscript binding devs are trying to figure out graalvm native image shared library isolates and isolatethreads, and how to manage them.
The rust implementor got 10 times improvement using the same isolate 10k times rather than creating a new one and tearing it down.
The function call being used returns a pointer to an allocated string buffer.
Afaict the buffers won't be freed until graal_tear_down_isolate(isolatethread)
is called.
Anyone know much about how isolates work in this regard?
@U04V15CAJ I noticed in https://github.com/babashka/sci/blob/master/doc/libsci.md
tutorial that you don't call graal_tear_down_isolate
at all.
I suspect it was to keep things succinct...
correct, if you want to do it properly you should call tear_down, but if it's a short lived CLI it's not really necessary
What I'm trying to figure out is how the thread heap grows for a long lived isolate
👍 thanks, didn't know about that
This article might also be useful, dunno: https://medium.com/graalvm/isolates-and-compressed-references-more-flexible-and-efficient-memory-management-for-graalvm-a044cc50b67e
I guess pinning is for passing stuff to C and holding on to it via GC: https://www.graalvm.org/sdk/javadoc/index.html?org/graalvm/nativeimage/PinnedObject.html
lol, I didn't notice at first but the medium post was my starting point on this whole thing :face_with_rolling_eyes:
anyway, chatting with the graal slack peeps seems best
will head over there tomorrow
calling the buffer returning function in a loop didn't seem to grow ram usage
but I'm not great at benchmarking