Hi Rick, While investing some more time in profiling, we encountered one memory leak by a) creating a database and b) adding additional documents via the Database Manage dialog in a second step. In Java, a strange decision was taken that top-level swing containers (such as our progress bar) won’t be garbage collected, even after they have been disposed [1].
I guess this is not a very serious leak in BaseX (it has never been reported in the past), but I have added a quick fix to tackle the most obvious case, and I’ll be interested in hearing if this will already reduce memory usage in your use experiments. A new snapshot is available [2]. Best, Christian [1] https://github.com/BaseXdb/basex/issues/1650 [2] http://files.basex.org/releases/latest/ On Mon, Dec 17, 2018 at 12:49 PM Christian Grün <christian.gr...@gmail.com> wrote: > > Hi Rick, > > Thanks for your observations. > > I restricted my main memory to 2 GB and I played around with your > sample data (with Windows). My memory consumption never exceeded 200 > MB (and after closing everything, it goes back to appr. 30 MB). Maybe > there is a single operation that I missed? > > If the limits for query results have been increased in the GUI > Preferences (in the "Result" tab), memory consumption might rise as > well. If you have not changed the defaults, you could help us by… > > • opening the "Used Memory" dialog (I think you have done this > already, right?) and > • clicking the "GC" after each single action you perform. > > If the "Used Memory" value rises a lot after a specific action even > after garbage collection, and if it doesn’t decrease after closing the > database, your editor tabs, visualizations, etc., then you might have > been able to isolate the operation that leads to the observed memory > leak. If you believe that the visualizations might affect memory > consumption, you can close them if a database is opened, and restart > BaseX (visualizations won’t be computed if they are not displayed). > Feel free to provide us with a list of the actions and the values for > the observed memory consumption. > > Best, > Christian