juji-io / datalevin

A simple, fast and versatile Datalog database
https://github.com/juji-io/datalevin
Eclipse Public License 1.0
1.13k stars 63 forks source link

Heap memory growth #204

Closed den1k closed 1 year ago

den1k commented 1 year ago

running this code repeatedly lead to ever increasing heap usage. version "0.8.12"

slack ref

(defonce test-conn
  (d/create-conn nil))

;; run this many times while watching heap
;; in VisualVM and running GC
(dotimes [i 10000]
  (d/transact! test-conn [{:foo i}]))
huahaiy commented 1 year ago

OK, running this more times, I did find something unexpected. There are too many instances of various types of objects that shouldn't be kept around. Will try to fix these.

huahaiy commented 1 year ago

Fixed.