Author Topic: Win 7 64-bit, Tagging is very slow  (Read 866 times)

davew

  • Senior Community Member
  • Posts: 224
  • Hero Points: 6
Win 7 64-bit, Tagging is very slow
« on: September 27, 2017, 03:27:25 pm »
I just created a project with not quite 80,000 files. They are mostly C/C++, but have others as well (nothing binary). It took 28 minutes to finish tagging, and during that time, I could not use the debugger because I had tried to use a tag and it locked me out.

My project is on an SSD drive and I have 16G of RAM. See attached files for machine specs.

My version is: SlickEdit Pro 2016 (v21.0.3.0 64-bit)
Hot fixes: Config\21.0.3\hotfixes\hotfix_se2103_5_cumulative.zip (Revision: 5)

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2791
  • Hero Points: 422
Re: Win 7 64-bit, Tagging is very slow
« Reply #1 on: September 28, 2017, 02:40:03 pm »
Looks like you have a strong machine, so you can increase some of the defaults for tagging performance.  Here are a few suggestions:

   1) First, if you have had to debug background tagging before,
       you might have turned on the macro variable (def_tagging_logging).
       Macro > Set Macro Variable... > def_tagging_logging (Set it to back to 0).
       Leaving this on does a lot of logging which can drag down performance.

   2) Tools > Options > Editing > Background Tagging...
       Use background tagging threads:      Make sure this is ON
       Number of tagging threads to start:  Increase to 8
       Max number of active tagging jobs:  Increase to 5000
       Max amount of background tagging memory usage (MB):  Increase to 128
       
   3) Tools > Options > Editing > Context Tagging(R)
       Use Memory Mapped Files:  Make sure this is ON
       Tag File Cache Size:  Increase to 64M (you will have to turn Memory Map off temporarily)
       Use independent database file caches:  ON

    4) While rebuilding the tag file in the background, your CPU usage should stay high.
        SlickEdit does throttle back the background tagging a bit, to be nice to other processes
        and to make it possible for SlickEdit to keep rocking in the foreground.
        If it is dragging down into the 10% range, then you are probably at the point where the
        database writer thread can not keep up with the parsing threads.

    5) Make sure you are getting the performance you think you are from your SSD.
        If it in an external USB drive, make sure it is on a USB 3.0 port.
        Run the BlackMagic speed test to verify the throughput.
        If your SSD is software encrypted, you might also be losing some
        throughput on account of that.

    6) I experimented at one point with using a RAM drive and directing my tag files there.
        It was very fast, except for the fact that it used a lot of memory and cleared itself
        every time I logged off.  That was actually not a bad thing, but with a large enough
        project it could be kind of a setback.  That combined with the fact that the RAM drive
        was redundant with the internal caching using memory mapped I/O.

A couple questions about your project:

    1) How large is the tag file after the build is finished?  Tools > Tag Files...

    2) Does it make heavy use of the Boost preprocessing macros?
« Last Edit: September 28, 2017, 03:23:06 pm by Dennis »

davew

  • Senior Community Member
  • Posts: 224
  • Hero Points: 6
Re: Win 7 64-bit, Tagging is very slow
« Reply #2 on: October 31, 2017, 12:01:28 pm »
Hi Dennis, sorry I didn't get back to you ... no excuses - you've heard them all :-).
  • I did have def_tagging_logging set to 1
  • Made changes in your item 2
  • Made changes in your item 3 (note that Tag File Cache Size was 500M, but I changed to 64M anyway)

While typing this reply, it tagged 40,000+ files, so seems to be much better. Thanks!

By the way, I am using 22.0.0.9 now, but it was going very slow before the changes as well.