Code
  1. Code
  2. CODE-1709

[pcgen] [5.17.19-dev] Used heap creep

    Details

      Description

      When I first load PCGen, it's using around 60,000,000 bytes. After loading CRB,APG,UC, it's at around 110,000,000.

      I'll load a character, and it jumps to around 200,000,000.

      I then go and unload the sources and it never drops below 200,000,000. So then I reload the CRB,APG,UC, and it jumps to 400,000,000. I'll then do a garbage collect, and it drops down to 275,000,000. But it'll never drop below this value until I close PCGen and reload it.

      Each subsequent time I unload and reload sources, the used heap increases and increases and increases.

        Issue Links

          Activity

          Hide
          James Dempsey
          added a comment -

          Identified that the data loaded for a previous gamemode was being retained. Corrected this so only the current game mode ever has loaded data.

          Note: There was no retention of data past a garbage collect after reloading the same sources. This was tested using memory snapshots in YourKit.

          Show
          James Dempsey
          added a comment - Identified that the data loaded for a previous gamemode was being retained. Corrected this so only the current game mode ever has loaded data. Note: There was no retention of data past a garbage collect after reloading the same sources. This was tested using memory snapshots in YourKit.
          Hide
          Brad Kester
          added a comment -

          Sorry, James! But I'm still seeing increases in the amount of heap used, and it continually increases over time/source reloads. After about 4-5 reloads, things get slow during any subsequent reloads, so I usually just shut down PCGen and restart it.

          Show
          Brad Kester
          added a comment - Sorry, James! But I'm still seeing increases in the amount of heap used, and it continually increases over time/source reloads. After about 4-5 reloads, things get slow during any subsequent reloads, so I usually just shut down PCGen and restart it.
          Hide
          James Dempsey
          added a comment -

          Please attach your pcgen.log file for a full session and a screen shot of the memory use before and after a garbage collect.

          Show
          James Dempsey
          added a comment - Please attach your pcgen.log file for a full session and a screen shot of the memory use before and after a garbage collect.
          Hide
          James Dempsey
          added a comment -

          From Brad's post to exp

          After loading sources, I'm at 135M.
          After loading a character, it jumps up +15-20M and never goes lower. Hit a "reload sources" and it jumped up to 210M. Even a GC never takes it lower than 200M. I then reload another character that uses different sources, and it's now 360M (GC drops it to 210M). Another reload of a different character takes it to 300M, which doesn't lower with GC. Unloading all characters and source materials still never goes below 270M at this point. It seems the more times I load sources and characters, the higher the minimum goes.

          Show
          James Dempsey
          added a comment - From Brad's post to exp After loading sources, I'm at 135M. After loading a character, it jumps up +15-20M and never goes lower. Hit a "reload sources" and it jumped up to 210M. Even a GC never takes it lower than 200M. I then reload another character that uses different sources, and it's now 360M (GC drops it to 210M). Another reload of a different character takes it to 300M, which doesn't lower with GC. Unloading all characters and source materials still never goes below 270M at this point. It seems the more times I load sources and characters, the higher the minimum goes.
          Hide
          James Dempsey
          added a comment -

          I've split the new report off to a separate issue as it is (code wise) different from this report.

          Show
          James Dempsey
          added a comment - I've split the new report off to a separate issue as it is (code wise) different from this report.

            People

            • Assignee:
              James Dempsey
              Reporter:
              Brad Kester
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: