Author Topic: v22 memory leak?  (Read 3283 times)

IkerAriz

  • Senior Community Member
  • Posts: 105
  • Hero Points: 1
Re: v22 memory leak?
« Reply #30 on: February 20, 2018, 02:02:11 pm »
No boost. But the project does make liberal use of the more common STL types (string, vector, list, map, etc).

IkerAriz

  • Senior Community Member
  • Posts: 105
  • Hero Points: 1
Re: v22 memory leak?
« Reply #31 on: March 01, 2018, 12:22:22 am »
Any luck with the latest profile? Is there other info I can provide to help with the debugging?

Iker

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2332
  • Hero Points: 308
Re: v22 memory leak?
« Reply #32 on: March 01, 2018, 04:25:27 pm »
I was not able to gather much from that profile.  I can say that STL context tagging is tough.  If you ever try to manually trace down what actually happens just to do something like: vector v [ x ] -> <list symbols>, you would have a long day of work before you untangled it all, if you were able to at all.  It is just a maze of typedefs and allocator templates, nothing goes directly from point A to point B.  And now we also have to do type inference with that.  We have some shortcuts in there to make some things faster, but perhaps we need to do even more.  We have another outstanding complaint that tagging is slow with Visual Studio 2017 headers.  This happens occasionally, compiler vendors change their STL implementation, and it seems to always adds more complexity.

One thing you can do to make things easier, is to make sure that you do not have duplicate STL implementations tagged in your workspace.  Set up and use your compiler configuration tag file, and do not tag another set of compiler headers in addition.  It is hard enough for tagging to untangle this mess, and even harder if there are multiple STL implementations to disambiguate.

IkerAriz

  • Senior Community Member
  • Posts: 105
  • Hero Points: 1
Re: v22 memory leak?
« Reply #33 on: March 07, 2018, 10:05:49 pm »
Here are my configuration changes thus far:
  • Disabled the options as recommended below (auto compat values, auto compat params, etc)
  • Removed all STL from the compiler tag files
  • Trimmed the compiler tag file to include only C files under /usr/include; ie, top level files, python C api headers, the gcc C headers (the "sys" and "asm" dirs under "x86_64-linux-gnu") plus a few others.   
  • Removed two C++ projects from my workspace (eigen and kaldi); workspace now has only one project (my own)
Editing feels faster, if a bit more spartan. There's also noticeable delay when hitting "alt-," to manually trigger function argument help (though this is less of a problem in practice). Memory consumption, surprisingly, appears to have worsened. My reduced workspace and and trimmed tag files are both considerably smaller than they were at the start of this thread yet heap memory on startup (with no files open) is ~230 MB compared to the earlier 175 MB. Heap consumption after startup grows continuously as before.

Thanks,
Iker


IkerAriz

  • Senior Community Member
  • Posts: 105
  • Hero Points: 1
Re: v22 memory leak?
« Reply #34 on: May 11, 2018, 02:26:11 pm »
Any news on this front?

Iker

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2332
  • Hero Points: 308
Re: v22 memory leak?
« Reply #35 on: May 14, 2018, 02:32:10 pm »
@IkerAriz:  What is your tag file cache set to?  You can, I do not entirely recommend it, but you can set it as low as 8M for a maximum tag file cache size.  You can also turn off the option to use memory mapped file I/O to further reduce the tag file caching footprint.  The memory footprint numbers you are reporting are in my opinion pretty normal amounts.  With most computers having at 8G plus of memory, we are trying to improve performance by caching in a lot of areas in the editor, so it is normal for the memory footprint to grow over time.  However, the tag file maximum is one way that you can absolutely reduce the footprint, if you are willing to sacrifice a certain amount of performance.

IkerAriz

  • Senior Community Member
  • Posts: 105
  • Hero Points: 1
Re: v22 memory leak?
« Reply #36 on: May 15, 2018, 01:48:39 pm »
Dennis,

Both "tag file cache size" and "tag file cache maximum" are set to 64 MB.

My concern is not that SE consumes a lot of memory per se but that I have so little control over, or insight into, how it's used for my benefit. I've disabled several tag-related features (as you recommended), removed many files from my project, trimmed tagged includes (STL), and reduced cache sizes to no avail. Memory use slowly but surely grows past 1 GB and beyond while editing a fairly small set of files (that's 1 GB of private, dirty memory). If all of my project's source code amounts to less than 100 MB what is that memory being used for? And why does it appear to grow without stopping? (*). 

Regards,
Iker

(*) Perhaps it does stop eventually but I restart SE once it hits ~1.5 GB.