Apostolos Manolitzas | 3 Mar 2006 08:21
Picon
Favicon

Performance issues

Hello,

I use emacs GNU Emacs 21.4.1 with the latest cedet suite  & speedbar.
But the performance during editing is devastating.
I have a C++ project with almost 100 cpp files.
1. Emacs is taking ages to start  because it parses every opened file
again and again.
2. When I do editing, emacs freeze for 1 or 2 secs, when i try to save
or even when I move around the edited part
    of the buffer.
3. Deactivating semantic and ecb everything works smoothly again.

My PC is a  Intel(R) Pentium(R) 4 CPU 2.40GHz

and in the .emacs configuration file I have
(setq semantic-load-turn-everything-on t)
(setq semantic-load-turn-useful-things-on t)
(require 'semantic-load)
(setq semantic-imenu-auto-rebuild-directory-indexes nil)
(setq imenu-auto-rescan nil)

(require 'ecb)

(setq semanticdb-project-roots
         (list "~/projects/src/FOO/NBANG"
               "~/projects/src/FOO/PBA"))

What I do wrong and the performance is so bad?

thanks in advanced,
(Continue reading)

Eric M. Ludlam | 8 Mar 2006 05:41
Gravatar

Re[1]: Performance issues

Hi,

  When you turn everything on, some things do slow down.  I recently
wrote a new section in the manual for assisting in tuning semantic for
some environment you could use, and perhaps provide feedback on.

  You can download it from CVS here:

http://cvs.sourceforge.net/viewcvs.py/*checkout*/cedet/cedet/semantic/doc/user-guide.texi?rev=1.24

  It is in the help node called "Speed Debug".  Copy the above file
into cedet/semantic/doc/user-guide.texi of your install area, and then
rebuild the doc.

  Suggestions for improving this section are welcome.

Thanks
Eric

>>> Apostolos Manolitzas <manap <at> intracom.gr> seems to think that:
>Hello,
>
>I use emacs GNU Emacs 21.4.1 with the latest cedet suite  & speedbar.
>But the performance during editing is devastating.
>I have a C++ project with almost 100 cpp files.
>1. Emacs is taking ages to start  because it parses every opened file
>again and again.
>2. When I do editing, emacs freeze for 1 or 2 secs, when i try to save
>or even when I move around the edited part
>    of the buffer.
(Continue reading)

Dan Hirsch | 8 Mar 2006 23:11
Picon

SQLite database backend

I'm interested in writing an sqlite backend; my current design is to
have a hunk of elisp call out to a daemon written in C (it's not easy
to parse the output from the sqlite command line tool, and this way, I
can make the lisp much simpler.)

So far, all is good, but I do have a few questions.

1) The semanticdb-file backend stores a large number of fields in the
tag; what are all of these? I just need to know what kind of data will
need to be stored so that I can create the schema.

2) I am NOT a lisp programmer. Actually, this is the first time I've
used it. So, if somebody would be willing to write the lisp part, I
would appreciate it. (maybe semanticdb-external?)

On the C side, using stdin/stdout would be easiest, but I can do
sockets/fifos/whatever. (actually, maybe not RPC, but that is a pain
period)

Finally, for an unrelated project, would it be theoretically possible
to run the bovinator in C? That would speed up bovinating /usr/include
exponentially, and also allow it to be done in the background.

The way that I could see doing it is having elisp feed the c-bovinator
a filename, which the c-bovinator would, well, bovinate, and send the
results back to emacs/the RDB backend described above.

I am not sure how long caching all of /usr/include would take, but I
get the feeling that it would not be something I could do over a
weekend... (it's about 350 MB of files, including Boost, which is
(Continue reading)

Eric M. Ludlam | 9 Mar 2006 05:13
Gravatar

Re[1]: SQLite database backend

>>> "Dan Hirsch" <thequux <at> gmail.com> seems to think that:
>I'm interested in writing an sqlite backend; my current design is
>tohave a hunk of elisp call out to a daemon written in C (it's not
>easyto parse the output from the sqlite command line tool, and this
>way, Ican make the lisp much simpler.)

Sounds like a good idea.

>So far, all is good, but I do have a few questions.
>
>1) The semanticdb-file backend stores a large number of fields in
>thetag; what are all of these? I just need to know what kind of data
>willneed to be stored so that I can create the schema.

The fields in a tag are completely arbitrary.  We've specified a few.
Your database should probably only specify search able fields that are
relevant in search.  The rest should be stored as Emacs Lisp parseable
text.

Key fields would be (based on function name.)

semantic-tag-name
semantic-tag-class  (a symbol, like 'function or 'variable)
semantic-tag-attributes   (a list of things like datatype or constness)
semantic-tag-properties   (a list of bookkeeping stuff)

Search routines that go through the database also search the following
fields:

semantic-tag-external-member-parent  (ie, a method of what class)
(Continue reading)

klaus.berndl | 10 Mar 2006 10:44
Picon

Question to semantic-idle-scheduler-mode

Hi Eric,

In my Emacs-setup i had a call like:

(global-semantic-idle-scheduler-mode -1)

to try out what happens with ECB when a user has switched off this mode.

But, when i run ECB and ECB calls semantic-fetch-tags (for testing i have programmed ECB so that if the
idle-mode is off then it always uses semantic-fetch-tags instead of semantic-fetch-available-tags -
but i will deactivate this after testing) then the idle-mode seems to somehow "automatically" switched
on for that file - see the output of C-h v semantic-idle-scheduler-mode:

semantic-idle-scheduler-mode's value is t
Local in buffer ecb-method-browser.el; global value is nil

Do you have an explanation for this behavior.?? Who/What switches on the idle-mode even i have deactivated
it via the global-... Command?

Ciao,
klaus

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
David PONCE | 10 Mar 2006 11:23
Picon

Re: Question to semantic-idle-scheduler-mode

Hi Klaus,

> In my Emacs-setup i had a call like:
> 
> (global-semantic-idle-scheduler-mode -1)
> 
> to try out what happens with ECB when a user has switched off this
> mode.
> 
> But, when i run ECB and ECB calls semantic-fetch-tags (for testing i
> have programmed ECB so that if the idle-mode is off then it always
> uses semantic-fetch-tags instead of semantic-fetch-available-tags -
> but i will deactivate this after testing) then the idle-mode seems
> to somehow "automatically" switched on for that file - see the
> output of C-h v semantic-idle-scheduler-mode:
> 
> semantic-idle-scheduler-mode's value is t
> Local in buffer ecb-method-browser.el; global value is nil
> 
> Do you have an explanation for this behavior.?? Who/What switches on
> the idle-mode even i have deactivated it via the global-... Command?

I just did a quick try of (global-semantic-idle-scheduler-mode -1),
and it works well for me.  No files are automatically parsed anymore.
I grepped the CEDET sources and didn't find one in which
semantic-idle-scheduler-mode could be locally enabled.

Perhaps your problem is related to ECB, because I don't use it?

David
(Continue reading)

klaus.berndl | 10 Mar 2006 11:47
Picon

RE: Question to semantic-idle-scheduler-mode

Hi david,

Thanks for your effort - ECB doesn' have a call to semantic-idle-scheduler-mode
Which could switch on this mode - therefore my question if somewhere in cedet
Is code which does here more than it should ;-)

Ciao,
Klaus

David PONCE wrote:
> Hi Klaus,
> 
>> In my Emacs-setup i had a call like:
>> 
>> (global-semantic-idle-scheduler-mode -1)
>> 
>> to try out what happens with ECB when a user has switched off this
>> mode. 
>> 
>> But, when i run ECB and ECB calls semantic-fetch-tags (for testing i
>> have programmed ECB so that if the idle-mode is off then it always
>> uses semantic-fetch-tags instead of semantic-fetch-available-tags -
>> but i will deactivate this after testing) then the idle-mode seems to
>> somehow "automatically" switched on for that file - see the output of
>> C-h v semantic-idle-scheduler-mode:
>> 
>> semantic-idle-scheduler-mode's value is t Local in buffer
>> ecb-method-browser.el; global value is nil
>> 
>> Do you have an explanation for this behavior.?? Who/What switches on
(Continue reading)

klaus.berndl | 10 Mar 2006 14:37
Picon

RE: c# #region and #endregion

Hi,
 
I was not aware that there is a parser for C#?!
 
But i think this problem could be solved via an appropriate setting of the option `semantic-lex-c-preprocessor-symbol-map' - see the documentation or search the semantic mailing-list - there was a thread which addresses a similar topic in c.
 
Ciao,
Klaus

From: ecb-list-admin <at> lists.sourceforge.net [mailto:ecb-list-admin <at> lists.sourceforge.net] On Behalf Of Amit Lath
Sent: Monday, March 06, 2006 8:41 PM
To: ecb-list <at> lists.sourceforge.net
Subject: [ECB-list] c# #region and #endregion

Hi,
 
i am using the latest ecb release with emacs 21.3.1 for programming in C#.
 
my problem is, when i have methods inside the c# #region and #endregion directives, the methods buffer doesnt see them.  as soon as i delete the above directives the methods buffer populates with the methods correctly.
 
is this behavior expected.  what can i do to support the #region and #endregion directives?
 
thanks
Amit Lath
 
 

Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.
Amit Lath | 14 Mar 2006 09:10
Picon

c# support (#region, #endregion directives)

Hi,
 
the semantic webpage says that semantic supports c#.  i am using ECB with emacs 21.3 which i believe uses semantic in the background (?). 
 
when i have the c# #region and #endregion preprocessor directives, the ecb parser fails to parse the file.  how can i add support for these directives into semantic, so that ecb correctly handles them.
 
thanks
Amit
 
ps: which file does semantic use to parse c#?
Eric M. Ludlam | 14 Mar 2006 12:54
Gravatar

Re[1]: c# support (#region, #endregion directives)

>>> "Amit Lath" <amitlath <at> gmail.com> seems to think that:
>Hi,
>
>the semantic webpage says that semantic supports c#.  i am using ECB with
>emacs 21.3 which i believe uses semantic in the background (?).
>
>when i have the c# #region and #endregion preprocessor directives, the ecb
>parser fails to parse the file.  how can i add support for these directives
>into semantic, so that ecb correctly handles them.
>
>thanks
>Amit
>
>ps: which file does semantic use to parse c#?
  [ ... ]

Hi,

  The C# support was written by David Shilvock and is in
cedet/contrib/wisent-csharp*.  I don't know C#, but if you let me know
what a #region is, I can get you started.

Eric

--

-- 
          Eric Ludlam:                 zappo <at> gnu.org, eric <at> siege-engine.com
   Home: http://www.ludlam.net            Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net               GNU: www.gnu.org

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

Gmane