Author Topic: Tagging...  (Read 805 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1825
  • Hero Points: 177
  • Text
Tagging...
« on: September 08, 2016, 07:15:52 pm »
I have a workspace open with a number of projects.
The compiler for all of the projects is set to "Clang...".


Yet, Slick has the python, jdk, gcc and visual studio VTG files open.


Why?


Is there a way to ask Slick how much memory it is using or would need fro VTG caching?




In Tools > Options > Editing > Context Tagging®
I have UseMemoryMapped files on.
But, if I turn that off, what should I set TagFileCacheSize and TagFileCacheMax to for best performance?




Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2789
  • Hero Points: 422
Re: Tagging...
« Reply #1 on: September 08, 2016, 10:39:59 pm »
There are a lot of scenarios.  Best performance depends on your hardware and what you have competing with SlickEdit for memory.  It's pretty straightforward to tune though.

"Use memory mapped files" will give you the optimal performance, unless you are on a system with low memory, or a 32-bit machine, or your tag files are on a network file system.

"Use independent database file caches" will make every tag database use it's own cache.  This will use more memory, but eliminates thrashing between databases competing for blocks in the tag database cache.  If you have a lot of memory, and don't want use memory mapped files, then use this, and set your tag file cache maximum to the size of your largest tag file.

As for the tag file cache sizes, the "Tag file cache size" is the amount you are suggesting SlickEdit to use as a baseline.  However, if at startup, SlickEdit sees that you have a lot more memory than that, it will try to use more, up to the "Tag file cache maximum", which is a hard maximum.

If you are using independent database cache sizes, then the "Tag file cache size" and "Tag file cache maximum" can use memory up to those amounts times the number of tag database you have open.  So, if you have a "Tag file cache maximum" of 100M, and you have 20 tag files active, SlickEdit could, use up to 2G of memory for tag file caching, if all your databases were that big.

"Use memory mapped files" is the best, because it lets the OS decide what blocks to cache, based on what is actively in use.  You can just set it and forget it.

Another thing to note.  It's not that important to have an excessively large tag file cache.  You can trim it way down.  I routinely do endurance testing where I scale the tag file cache down to 8M and rebuild my tag files as well as some large project cases.  I also routinely forget to return that setting back to normal, and it takes a while before I notice the performance difference.  There is a balance between doing a lot of caching, and having a smaller memory model and getting better locality of reference.  What's optimal really depends on your hardware and how much resources you want to dedicate to SlickEdit.

As for non-active tag files being open, there a lot of things that do completions, so it is pretty easy to "hit" one of those tag files.  It does no harm to leave them open, and in my experience, it is better than the thrashing you can see if they are tidied up and closed and then re-opened again when they are needed.