Author Topic: Mac V16.0.2 Background Tagging hanging the editor until complete  (Read 17642 times)

ExtremeXS

  • Senior Community Member
  • Posts: 108
  • Hero Points: 6
I've tried running 16.0.2 today on Mac OSX 10.6.8 today and have found that the background tagging keeps stalling the editor and making it unresponsive for a couple of minutes at a time.  I also got this to happen is I rebuilt the tag file, ran for a while and then stalled the editor until almost completed.

I have noticed this happen when I have switched to a different application and the back to slickedit.  I can't quite make it happen on demand, it just occurs in usage.  There has been no changes to the tagged files upon switching back, so it seems to also stall when checking.

Back to 16.0.1 which does not exhibit this behaviour....

« Last Edit: August 15, 2011, 01:40:00 PM by ExtremeXS »

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #1 on: August 15, 2011, 05:28:57 PM »
This has been happening for me also with 16.0.2 on Windows 7 Enterprise.

SlickEdit Support

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 384
  • Hero Points: 29
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #2 on: August 15, 2011, 06:40:41 PM »
Try going to Tools > Options > Editing > Context Tagging® > and set "Background Tagging of other files" = FALSE.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #3 on: August 16, 2011, 08:10:24 AM »
@Ashley: Could you please clarify the (non-obvious) reason why setting this option to FALSE should help ?
Thanks, HS2

ExtremeXS

  • Senior Community Member
  • Posts: 108
  • Hero Points: 6
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #4 on: August 16, 2011, 09:18:38 AM »
Hey Ashley,

Mine is already set to FALSE in both 6.0.2 and 6.0.1.

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #5 on: August 16, 2011, 01:54:04 PM »
I saw this behavior on occasion as well on Mac OS X yesterday. The only time I could reproduce it was to quickly switch between multiple applications, then back to SE. I tweaked some of the performance settings for context tagging and background tagging, and have not had a recurrence. I have exported my tweaked options and attached them here.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #6 on: August 16, 2011, 03:06:49 PM »

The reason you want to turn Tools > Options > Editing > Context Tagging(R) > Background tagging of other files to False is that it is an old option for the old, obsolete system for keeping your workspace tag file up to date.  I really should have pulled it out of the product before 16.0.0 was shipped, but it is easy to forget about something you have had turned off for years.

The reason that you may be experiencing hangs is that this feature and the threaded tagging are competing for resources, and the old system, since it runs in the main thread on a timer event, is going to win, and then hold up the show.

The Background tagging of other files options will be removed in the next major release.  We will also be adding a new option for background threads to update language specific tag files (in addition to updating the workspace tag file, which it already does).

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #7 on: August 16, 2011, 07:30:56 PM »
Thanks Dennis for the comprehensive explanation. I just don't like magic options ;) HS2

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #8 on: August 16, 2011, 09:49:54 PM »
Thanks.

What should I set-var to turn it off?  I have a macro that reconfigures a stock vslick.sta to my preferred settings, and I want to update it.

Also, while searching the 16.0.2 Help file for that, I ran across this section in "Performance Tuning".  The yellow highlights look out of date.  For the red highlights, is there another feature that now takes care of that?  I do want SE to automatically detect updated files and tag them in the background.*

Quote
Background Tagging
If you are experiencing sporadic pauses in SlickEdit, the first thing to check is that Background tagging of other files is off. It's generally fine to leave Background tagging of open files on. We recommend that you turn that off only after you've applied all other tuning approaches. Likewise, you should leave Tag file on save enabled. This ensures that the tag database is always current by tagging a file when it is saved.

The context tagging engine is single threaded with SlickEdit, and background tagging has been known to introduce random periods of unresponsiveness. Generally, you don't need to tag other files in the background. Once you've tagged your workspace, you only need to tag files that are being changed, and SlickEdit does this automatically if you leave the other two values on.

The exception to this is if you fetch updated files from a source code repository. Then, other developers may have changed files or added new ones. SlickEdit won't know about those changes until you retag the workspace. For normal size projects, SlickEdit can tag the workspace in a few minutes. On extremely large projects, this can take over an hour. Your strategy for how and when to tag depends on the size of your codebase.

* Ideally on Windows it would use FindFirstChangeNotification to let the OS notify it when files change, so it doesn't have to keep checking the disk (CPU and IO cost/contention) and preventing the drive from going into low power mode.

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #9 on: August 17, 2011, 08:21:31 AM »

Quote
What should I set-var to turn it off?

From looking in options.xml
Quote
<PropertyGroup Caption="Background tagging of other files">
                    <Boolean Caption="Background tagging of other files" Variable="def_autotag_flags2" Flag="AUTOTAG_FILES" DialogHelp="When set to True, tag files are updated when another application modifies a file. Note that this causes SlickEdit to constantly perform disk I/O to check dates of files on disk."/>

It's currently bit 3 in def_autotag_flags2 but it's off by default.


« Last Edit: August 17, 2011, 09:44:28 AM by Graeme »

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #10 on: August 17, 2011, 04:27:30 PM »
Oh sweet, I hadn't realized options.xml is effectively a reference book for which flags/vars go with which features.  Thanks, Graeme!  ++hp

Barak

  • Community Member
  • Posts: 13
  • Hero Points: 1
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #11 on: August 19, 2011, 07:26:46 AM »
I have a very similar issue with Win7, solution - un-install v16 and re-install v15 and back to a working SE...
Pretty severe solution but I'm really getting sick of the linux and windows versions of 16 just being totally unresponsive and unusable.

ExtremeXS

  • Senior Community Member
  • Posts: 108
  • Hero Points: 6
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #12 on: August 19, 2011, 11:19:17 AM »
I have tried Matthew's settings finally today (Thanks for that btw).

However the problem still persists, with editor unresponsiveness whilst it is tagging in the background.  I would say the settings hang for less time and it's a little harder to stall, but it still happens and the editor becomes unresponsive.

I also tried a completely flat setup (new config), and the editor literally hangs and will not come back at all (forced quite to close it).

So for me at least, something has gone rather awry in 16.0.2 versus no real issues on 16.0.1/0 on the Mac.

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #13 on: August 19, 2011, 05:07:02 PM »
Same for me:  Turning "Background tagging of other files" = False helps some, but I still run into long hangs (less often) where SE is unresponsive (cursor on Win7 is the swirling circle, app window is frosted/dimmed, title bar says "not responding") for anywhere from seconds to minutes.  When it stays stuck longer than a couple minutes I kill it because I need to get back to work.

Also, now that I'm paying close attention to background tagging, I frequently see many "invalid file seek position" errors on the status bar while SE is tagging in the background.  The files where it reports that are perfectly valid files that exist and which SE is able to tag just fine, so I'm not sure what's going on.

I'll open the zip file from Matthew and see if his settings help further.

By the way, I'm using SE mostly on solid state drives, so I'm a bit surprised there are any perceivable hangs at all.  I don't think SE is blocking on IO, the IO is too fast for that and there's no seek time.  So I'm hoping it has something to do with the size of batched operations or something, and that Matthew's setting tweaks will help.

ExtremeXS

  • Senior Community Member
  • Posts: 108
  • Hero Points: 6
Re: Mac V16.0.2 Background Tagging hanging the editor until complete
« Reply #14 on: August 19, 2011, 06:22:30 PM »
If feels more like a threading problem to me, there tends to be no sign of disk or CPU activity when the SE stalls.