Author Topic: long delay when clicking on first line of class declaration  (Read 9919 times)

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
long delay when clicking on first line of class declaration
« on: October 27, 2015, 08:48:38 PM »
I stripped this class declaration way down so as not to clutter things too much. When I click on any line other the first one, the cursor moves without any delay. But if I try to click on the first line ("class ConfigParams") there is about a 5 second delay before the cursor moves. The problem seems to occur in every .h file that has a class declaration.

class ConfigParams
{
    friend S16 debugFunctions(void);

    public:
        ConfigParams(void);
        ~ConfigParams(void);

        U32 getCumulativeTestCount(void) const;
        U32 incrementCumulativeTestCount(void);
       
    private:
        U16 pad;    // needed to align crc in last two bytes of the block
        U16 crc;

        void updateCrc(void);
        bool writeToEeprom(void) const;
        void setCumulativeTestCount(U32 count);
};

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: long delay when clicking on first line of class declaration
« Reply #1 on: October 28, 2015, 03:16:26 PM »
The delay may be more related to the comment before the class than the class itself.  This can be proven using Slick-C profiling.  Macro > Slick-C profiling > ...

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: long delay when clicking on first line of class declaration
« Reply #2 on: October 28, 2015, 03:25:10 PM »
I had suspected the comment when I was troubleshooting this, but even after removing everything above the class declaration line, the problem still occurred.

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: long delay when clicking on first line of class declaration
« Reply #3 on: October 28, 2015, 03:27:50 PM »
Attached is the profiler output. In this case, the class declaration was on line 1 of the file. No comments before it.

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: long delay when clicking on first line of class declaration
« Reply #4 on: October 28, 2015, 04:58:27 PM »
I can't say for certain based on the profiling results, but please try this same test case with the next release candidate (RC3) when it is available.  I had put in a specific fix to the code that finds symbol matches for "Show info for symbol under mouse" which is where your delays are originating from.

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: long delay when clicking on first line of class declaration
« Reply #5 on: October 29, 2015, 04:13:57 PM »
I tested this with RC3. It is a lot better -- only about 1 second of delay now. But version 19 was instantaneous, so there is still something wrong going on.

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: long delay when clicking on first line of class declaration
« Reply #6 on: October 29, 2015, 04:24:03 PM »
Do you have the option to "Show information about symbol under mouse" turned on in v19?

How many instances of the class "ConfigParams" do you have in your workspace?

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: long delay when clicking on first line of class declaration
« Reply #7 on: October 29, 2015, 04:32:39 PM »
The "show info" option is enabled in V19. There is only one instance of the class. I have attached profiler results for both V19 and V20 in case that helps.

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: long delay when clicking on first line of class declaration
« Reply #8 on: October 29, 2015, 11:17:34 PM »
Try this when RC4 is available.  I did find one bug that could have been the source of the delays.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: long delay when clicking on first line of class declaration
« Reply #9 on: October 30, 2015, 03:00:43 PM »
Please try RC 4

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: long delay when clicking on first line of class declaration
« Reply #10 on: October 30, 2015, 03:36:19 PM »
Still have about a second delay with RC4. I have attached new profiler report.

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: long delay when clicking on first line of class declaration
« Reply #11 on: October 30, 2015, 03:49:18 PM »
Just to make sure there was not something wrong with my project that was causing this problem, I created a new workspace and project from scratch. The attached zip file contains that workspace, and it exhibits the same delay problem.

Below is the info on my configuration. Let me know if you want me to send any other files.

SlickEdit Pro 2015 (v20.0.0.10 64-bit)

Serial number: FE25543_BETA
License type: Beta License
License expiration: 2015-12-10 03:04:00
License file: C:\ProgramData\slickedit\20\slickedit.lic

Build Date: October 29, 2015
Emulation: CUA

OS: Windows 8 x64
OS Version: 6.02.9200 
Memory: 33% Load, 8172MB/24455MB Physical, 9374MB/28039MB Page File, 718MB/134217727MB Virtual
Shell Information: C:\WINDOWS\system32\cmd.exe /q
Screen Size: 1920 x 1080, 1440 x 810, 1920 x 1200

Project Type: Cpp
Language: .h (C/C++)
Encoding: Automatic

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: long delay when clicking on first line of class declaration
« Reply #12 on: October 30, 2015, 04:44:50 PM »
I can't reproduce what you are seeing, so there must be something different.

Does this also happen with a default configuration?

Where are you specifically clicking, on the "class" keyword, or on the class name "Junk"?

If you place the cursor on "class" and hit Ctrl+Dot, what matches do you get?

Could you export your Editing > Context Tagging & Background Tagging options and your Languages / C++ options so I can compare?

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: long delay when clicking on first line of class declaration
« Reply #13 on: October 30, 2015, 06:08:57 PM »
Hi, Dennis,

Using a default config the problem seems to go away.
I am clicking on or before the "class" keyword. If I click in the class name there is no delay.
I have attached a screen shot of the matches I get for Ctrl+Dot. It's the same for V19.
I have attached my options export.

Thanks,

Dave

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: long delay when clicking on first line of class declaration
« Reply #14 on: October 30, 2015, 09:25:03 PM »
There's the problem.  A zillion symbols named "CLASS" that are found when "class" doesn't matching anything.

I'm taking a two-prong approach on your problem.  (1) make the symbol mouse-over search ignore keywords, numbers, and line numbers, and (2) make the search respect the "Use strict case-sensitivity rules" option for Context tagging if you have that turned on.

As a workaround for your current plight, I would suggest dialing down Tools > Options... > Editing > Context Tagging > Maximum functions found by parameter help (this option also applies to the symbol mouse-over).