Author Topic: Using autocomplete with c++ std namespace causes large pauses.  (Read 8927 times)

Bhelyer

  • Community Member
  • Posts: 29
  • Hero Points: 3
Using autocomplete with c++ std namespace causes large pauses.
« on: February 26, 2009, 11:30:50 PM »
Running SlickEdit 13.0.2 on Ubuntu 8.10 32 bit.

When writing in C++ using anything in the std namespace is painful. Like so:

Code: [Select]
#include <iostream>
#include <ostream>
#include <cstdlib>

int main()
{
    std::/*four second pause*/cout /*four second pause*/<< "Hello, world." << std::/*four second pause*/endl;
    return EXIT_SUCCESS;
}

Running a Pentium 4 2.4 ghz, 1.2 GB ram. Any ideas? Not deal breaking, but it's annoying.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Using autocomplete with c++ std namespace causes large pauses.
« Reply #1 on: February 27, 2009, 10:45:12 PM »
Are your source files, tag files, and project files stored locally? If this is happening consistently, then it is likely due to latency accessing a file, most likely the tag file. We generally don't see this kind of problem unless files are stored on network drives.

Bhelyer

  • Community Member
  • Posts: 29
  • Hero Points: 3
Re: Using autocomplete with c++ std namespace causes large pauses.
« Reply #2 on: March 01, 2009, 10:20:29 PM »
Are your source files, tag files, and project files stored locally? If this is happening consistently, then it is likely due to latency accessing a file, most likely the tag file. We generally don't see this kind of problem unless files are stored on network drives.

No, just in the default local position (~/.slickedit or something I'd imagine) on my hard-drive. This only happens in the std namespace, all other tag files are fine.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Using autocomplete with c++ std namespace causes large pauses.
« Reply #3 on: March 03, 2009, 02:24:18 PM »
What compiler are you using? Is there any chance you could create a small sample workspace that demonstrates this problem? We haven't been able to reproduce this. We might be able to learn more from looking at the project and workspace files.

dimrub

  • Community Member
  • Posts: 8
  • Hero Points: 0
Re: Using autocomplete with c++ std namespace causes large pauses.
« Reply #4 on: March 03, 2009, 02:59:50 PM »
Happens to me too, exactly as described. 13.0.2.0 on Linux. Not as much as 4 secs, but 2 secs for sure, which is annoying nevertheless.

Bhelyer

  • Community Member
  • Posts: 29
  • Hero Points: 3
Re: Using autocomplete with c++ std namespace causes large pauses.
« Reply #5 on: March 04, 2009, 04:12:55 AM »
What compiler are you using?

GCC 4.something(probably 3).something(perhaps 2) not sitting at the machine right now, but I'll check that.

Quote
Is there any chance you could create a small sample workspace that demonstrates this problem? We haven't been able to reproduce this. We might be able to learn more from looking at the project and workspace files.

Sure thing. Again, not sitting at the machine now, but from what I recall, Project->New Project, GNU C/C++ project, add a main.cpp file, attempt to write Hello World should do it. I'll get something for you though.

Bhelyer

  • Community Member
  • Posts: 29
  • Hero Points: 3
Re: Using autocomplete with c++ std namespace causes large pauses.
« Reply #6 on: March 04, 2009, 04:14:31 AM »
Happens to me too, exactly as described. 13.0.2.0 on Linux. Not as much as 4 secs, but 2 secs for sure, which is annoying nevertheless.

What specs are you running on?

dimrub

  • Community Member
  • Posts: 8
  • Hero Points: 0
Re: Using autocomplete with c++ std namespace causes large pauses.
« Reply #7 on: March 04, 2009, 10:14:11 AM »
What specs are you running on?

Just about the same as yours, only I use kubuntu instead of ubuntu, and got 2gig RAM.

Bhelyer

  • Community Member
  • Posts: 29
  • Hero Points: 3
Re: Using autocomplete with c++ std namespace causes large pauses.
« Reply #8 on: March 10, 2009, 01:03:38 AM »
Sample workspace/project attached. The pause is closer to two seconds as dimrub describes, still really annoying. :)


SlickEdit Support

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 384
  • Hero Points: 29
Re: Using autocomplete with c++ std namespace causes large pauses.
« Reply #9 on: March 12, 2009, 10:29:48 PM »
Hi Bhelyer and dimrub,

Can you try to replicate this in a clean configuration directory?

Simply start SlickEdit as such:

./vs -sc /tmp/test_config/

This will start SlickEdit in an out-of-the-box state (and won't touch your personal config).

Open the sample CPP project via Project-->All Workspaces-->Sample Workspaces-->cpp.vpw and try to replicate.

If you can indeed replicate, exit and restart SlickEdit, opening the same project.

Right before you replicate this again:

1) Go to the SlickEdit command line and type "profile on".
2) Reproduce the delay.
3) Go to the SlickEdit command line and type "profile save".
4) Post the slick-c profiling data here. (You will get a buffer called profile.txt)

Thanks,
SlickEdit Support

Bhelyer

  • Community Member
  • Posts: 29
  • Hero Points: 3
Re: Using autocomplete with c++ std namespace causes large pauses.
« Reply #10 on: March 13, 2009, 05:00:09 AM »
Reproduced in temporary profile.

Attached is profiling information.

Thanks.

SlickEdit Support

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 384
  • Hero Points: 29
Re: Using autocomplete with c++ std namespace causes large pauses.
« Reply #11 on: March 16, 2009, 01:54:36 PM »
Here are a few options that you can change that should get you back to smoother editing:

Go to Tools --> Options --> Editing --> Context Tagging

Maximum Functions found by parameter help:  Default 100.  You can lower this to 50.
Maximum Globals shown in list members:  Default 100.  You can lower this to 50.
Maximum Class/Struct members shown in list:  Default 400. You can lower this to 100.
Maximum Candidates for list parameters: Default 200.  You can lower this to 50

Response time for list params:  Default 1000.  You can lower this, but please note: This setting is an upper limit on the amount of time SlickEdit will spend finding compatible parameters. Note that this is not a hard limit; in some cases, evaluating the assignment compatibility of a single variable can be time-consuming, especially when templates are involved.

Maximum Tags found in symbol search:  Default 1000.  You can lower this to 500
Maximum Tagging Cache size:  Default 64000.  You can INCREASE this by 2X (or 3X) if your project is large.

The above should solve the delay problem for you. Here are a couple of other items you can address while you are at it which can pre-empt performance issues:

Go to Tools --> Options --> Application Options --> Virtual Memory and adjust:

Spill File Path:  This text box specifies a directory where spill files and temporary files should be placed. On UNIX: This defaults to the directory specified by the TMP environment variable.  You can actually add a specific path that you know has a large disk size allocation.  (I just use /tmp/ on *nix.

Buffer cache size(k): Specifies the maximum amount of memory used to store text buffer data in kilobytes. (A value less than zero will use all available memory.)  WARNING:  If the operating system starts swapping before the cache is full, performance will be about three times slower than normal. The cache size must be smaller than the amount of actual memory available.

Do let us know if the above helps, especially the changes to the "Maximums".

Best,
SlickEdit Support

Bhelyer

  • Community Member
  • Posts: 29
  • Hero Points: 3
Re: Using autocomplete with c++ std namespace causes large pauses.
« Reply #12 on: March 16, 2009, 10:28:31 PM »
The maximums did it. The pause is now in the order of milliseconds.

Thank you.

Just out of curiosity: what's the bottleneck here? Presumably your test Linux machines don't have this problem. Is it the CPU (that's usually the bottleneck for most things with this machine). I assume if it was the hard drive, the pause would only occur the first time.
« Last Edit: March 16, 2009, 10:32:27 PM by Bhelyer »