SlickEdit Community

Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2015 v20 Beta Discussion => Topic started by: davehohl on October 27, 2015, 08:48:38 PM

Title: long delay when clicking on first line of class declaration
Post by: davehohl 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);
};
Title: Re: long delay when clicking on first line of class declaration
Post by: Dennis 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 > ...
Title: Re: long delay when clicking on first line of class declaration
Post by: davehohl 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.
Title: Re: long delay when clicking on first line of class declaration
Post by: davehohl 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.
Title: Re: long delay when clicking on first line of class declaration
Post by: Dennis 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.
Title: Re: long delay when clicking on first line of class declaration
Post by: davehohl 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.
Title: Re: long delay when clicking on first line of class declaration
Post by: Dennis 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?
Title: Re: long delay when clicking on first line of class declaration
Post by: davehohl 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.
Title: Re: long delay when clicking on first line of class declaration
Post by: Dennis 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.
Title: Re: long delay when clicking on first line of class declaration
Post by: Clark on October 30, 2015, 03:00:43 PM
Please try RC 4
Title: Re: long delay when clicking on first line of class declaration
Post by: davehohl on October 30, 2015, 03:36:19 PM
Still have about a second delay with RC4. I have attached new profiler report.
Title: Re: long delay when clicking on first line of class declaration
Post by: davehohl 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
Title: Re: long delay when clicking on first line of class declaration
Post by: Dennis 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?
Title: Re: long delay when clicking on first line of class declaration
Post by: davehohl 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
Title: Re: long delay when clicking on first line of class declaration
Post by: Dennis 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).
Title: Re: long delay when clicking on first line of class declaration
Post by: davehohl on October 30, 2015, 09:48:35 PM
Dennis,

I lowered the Max functions from 100 to 10, and that did significantly speed things up. The thing that still puzzles me, though, is why v19 does not have the problem. It showed the same huge list when I did ctrl+dot on the class keyword, but it did not have the delay issue.

Thanks,

Dave
Title: Re: long delay when clicking on first line of class declaration
Post by: Dennis on October 30, 2015, 10:00:16 PM
v20 tries harder.

Seriously, we added some code so that the mouse-over would extract comments for all the symbol matches, definitions and declarations, because people want to see the comments and are very inconsistent about where they like to put them.  Somebody asked for it.  Not much of a problem when you just have a declaration and a definition (or a few), but more trouble if you have a symbol with 1000 matches.  That's where the 1 second time limit comes into play.  That is also a tunable parameter, in the Context Tagging options, BTW.
Title: Re: long delay when clicking on first line of class declaration
Post by: davehohl on October 30, 2015, 10:38:57 PM
Okay, I see now. Well, ignoring keywords should fix my problem then.
Title: Re: long delay when clicking on first line of class declaration
Post by: davehohl on November 02, 2015, 10:46:25 PM
Checked this out with RC5. Even with "max functions" set to 1000, the cursor movement is now instantaneous. Thanks for fixing this!