Author Topic: Window grays out and is unresponsive for many seconds  (Read 2068 times)

lahughes

  • Community Member
  • Posts: 45
  • Hero Points: 1
Re: Window grays out and is unresponsive for many seconds
« Reply #15 on: May 17, 2019, 03:02:09 pm »
It does seem random to me, but always when I am scrolling (and have someone looking over my shoulder :). I am only working in one file and haven't noticed it while looking through other files. This file isn't that large. My source is local. I'll look at the logs the next time it does it since I didn't catch the time(s) it happened.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1095
  • Hero Points: 100
Re: Window grays out and is unresponsive for many seconds
« Reply #16 on: May 17, 2019, 03:12:19 pm »
Ok, in the meantime, if you could post your user.cfg.xml file from the config directory ($HOME/.slickedit/23.0.1/user.cfg.xml), I can take a look at it and see if I can get anything out of it that can help.

lahughes

  • Community Member
  • Posts: 45
  • Hero Points: 1
Re: Window grays out and is unresponsive for many seconds
« Reply #17 on: May 17, 2019, 03:36:17 pm »
Here you go.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1095
  • Hero Points: 100
Re: Window grays out and is unresponsive for many seconds
« Reply #18 on: May 17, 2019, 04:59:02 pm »
When  you get a chance, open that file you have problems with, go to the View -> Symbol Coloring menu, and see if the "Enable Symbol coloring" entry is checked.  If so uncheck it.  I suspect that it got turned on just for this file, and is what's making us pause.  Symbol coloring does a lot of tagging lookups for what's on the screen to give more specific colors for the source code than just "keyword", "library function", etc...  A limitation of symbol coloring is that if the tagging queries take too long, it can block the main GUI thread.

I should have caught on to this sooner, but I didn't know how much of the profile to trust (it ran long enough where some of the counters overflowed), and I forgot symbol coloring can be enabled per-file in addition to at the language level.

lahughes

  • Community Member
  • Posts: 45
  • Hero Points: 1
Re: Window grays out and is unresponsive for many seconds
« Reply #19 on: May 17, 2019, 05:07:37 pm »
Enable Symbol coloring does not appear to be selected.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1095
  • Hero Points: 100
Re: Window grays out and is unresponsive for many seconds
« Reply #20 on: May 17, 2019, 05:26:48 pm »
And it was not enabled for any languages in your config.  There shouldn't be a way for those lookups to happen otherwise, but I'll check the code and see if I find anything.  It's the only thing I've spotted so far that can block the main thread.  Thanks.

Graeme

  • Senior Community Member
  • Posts: 2340
  • Hero Points: 307
Re: Window grays out and is unresponsive for many seconds
« Reply #21 on: May 17, 2019, 10:37:40 pm »
I've not used the linux version before. The entire setup is new to me. Brand new configuration, fresh SE download, fresh Ubuntu 16.4 install.

This could be a QT / Linux problem.  Google for the following gets a few hits

Quote
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action

lahughes

  • Community Member
  • Posts: 45
  • Hero Points: 1
Re: Window grays out and is unresponsive for many seconds
« Reply #22 on: May 20, 2019, 05:27:08 pm »
Should I try to get the macro going again? Today seems to be day when it is graying out frequently.

I looked up QT (I am unfamiliar with it) and it is supported on Ubuntu 16.04.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1095
  • Hero Points: 100
Re: Window grays out and is unresponsive for many seconds
« Reply #23 on: May 20, 2019, 07:05:49 pm »
If you think you can capture the profile in a relatively short amount of time, then go ahead.  If you get it to happen with the profiling, post it and let me know roughly how long it was running.

The Qt thing with the messages is something I need to look at, but I think is separate from the pausing, since turning off the system menu integration doesn't change the delays you're seeing.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1095
  • Hero Points: 100
Re: Window grays out and is unresponsive for many seconds
« Reply #24 on: May 20, 2019, 07:27:59 pm »
Actually, one more thing.  Can you post the vrestore.slk file from your configuration directory?  (Unless you're overriding it at the command line, that would be  $HOME/.slickedit/23.0.1/vrestore.slk).

lahughes

  • Community Member
  • Posts: 45
  • Hero Points: 1
Re: Window grays out and is unresponsive for many seconds
« Reply #25 on: May 20, 2019, 07:35:00 pm »
Here you go. It ran for about 5 minutes before graying out. It was unusable for about 5 minutes before coming back. I've attached the output from the macro as well as the vrestore.slk file.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1095
  • Hero Points: 100
Re: Window grays out and is unresponsive for many seconds
« Reply #26 on: May 20, 2019, 09:33:03 pm »
Had you just done a references search before it grayed out, or you were just moving through the file when it happened?

At first glance, it's largely tagging lookups. The large amount of time and the fact that it's blocking the gui thread are strange.  I think we've already gotten the usual information we'd usually collect for something like this.  You have a few files that are local to your system and not on a network drive.  It happens in just one of the files, and you said the file isn't that large. 
 
I still have some things to look at here.  We may be able to use the linux "perf" command to get a profile of what's going on at a lower, native level when it hangs up like that.  I'll update the thread with instructions if it comes to that.




patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1095
  • Hero Points: 100
Re: Window grays out and is unresponsive for many seconds
« Reply #27 on: May 21, 2019, 03:21:53 pm »
Going over it again and talking to the tagging developer, it looks like a background reference search is running into some files that are taking it long enough where it ends up delaying the main thread.  Why that happens depends on what the Ctrl-/ search is for, and what's in the files it's having trouble with. 

If you can figure out what search causes the slowdown, then you can see what files it's having problems with by watching the status messages in the lower left hand corner.  There will be messages like: 'Searching "somefile" for references. Press any key to stop.'   Make a note of any files that take a long time.

If you're not using a lot of the reference results, you could also change "Tools -> Options -> Editing -> Context Tagging -> Find references search strategy" to "incremental".  That defers processing until you ask for the next reference.

The worst case I can get on my system is doing a reference search for 'const', which takes about 5 seconds each for a handful of Qt header files in my workspace.  They aren't big files, but are structured in a way that makes the the tagging jump through hoops to make sure it's searching the right context.  Usually I'd use "find in files" to search for the keyword 'const', and only use a reference search if I wanted to find "operator const()" functions.

lahughes

  • Community Member
  • Posts: 45
  • Hero Points: 1
Re: Window grays out and is unresponsive for many seconds
« Reply #28 on: May 21, 2019, 08:05:26 pm »
I set the search option you asked for and I'll update the thread whether that helps or not.

This is happening in a different file as well. I don't recall if I did reference or not, but I don't think I did. There are no messages displayed in the lower left hand corner.

All the code is local to my machine.

lahughes

  • Community Member
  • Posts: 45
  • Hero Points: 1
Re: Window grays out and is unresponsive for many seconds
« Reply #29 on: May 22, 2019, 03:21:42 pm »
Even after setting the search option it is still graying out. I moved my code to a different directory, cleared the files and pointed to the new directory. It's grayed out twice now in the last 20 minutes.