=20
Hello David/Eric,
I tried the add-hook and it did not have any effect. I'm still
periodically freezing up when I move around in this mondo-header file.
My point max is way greater than 50000. I even tried the following:
(add-hook 'semantic--before-fetch-tags-hook
(lambda ()
(if (string-match "\\foo.h$"
(buffer-file-name (current-buffer)))
nil
t)))
I added a temporary debug clause that prints out some garbage to the
*Message* buffer if the string match is true. I removed it once I
confirmed that nil will be returned. Anyway, even this did not help the
periodic freezing.=20
How can I set this up so that parsing happens once at the time the
buffer is opened and only done thereafter if I manually call it?
Perhaps there are other more elegant solutions than the one time
parsing?
Thanks.
-------------
Javier
=20
-----Original Message-----
From: cedet-devel-admin@...
[mailto:cedet-devel-admin@...] On Behalf Of Ishee,
David M
Sent: Monday, October 25, 2004 10:10 AM
To: ecb-list@...; cedet-devel@...
Subject: RE: [ECB-list] Re: [CEDET-devel] ECB/CEDET question
I've had similar problems on a large Java file. The thing that seems to
work best was suggested by Eric Ludlam. I saw Emacs freeze for a time
with the message "Updating Tag Table".=20
I'm using method 2 at the moment and it works pretty well. I opened my
large file to find out an appropriate point value to use instead of
50000. I put this hook in my ~/.xemacs/init.el startup file.
Eric's suggestions:
You can probably add a hook to `semantic--before-fetch-tags-hook'
to solve this problem.
In your hook function, you could decide if you really want the file
parsed or not, then return nil or t.
for example
(add-hook 'semantic--before-fetch-tags-hook
(lambda ()
(if (> (point-max) 50000)
nil
t)))
for just a brute form. You could get more elegant by asking if the
tag cache is non-nil, so it parses at user requested flush time
like this:
(add-hook 'semantic--before-fetch-tags-hook
(lambda ()
(if (and (> (point-max) 50000)
(not (semantic-parse-tree-needs-rebuild-p)))
nil
t)))
If you settle on something you like, I can add it to semantic as an
option.
Eric
David=20
-----Original Message-----
From: ecb-list-admin@...
[mailto:ecb-list-admin@...] On Behalf Of
eric-at-siege-engine.com |ECB mailing list|
Sent: Friday, October 22, 2004 1:50 PM
To: Ishee, David M
Cc: klaus.berndl@...; ecb-list@...;
cedet-devel@...
Subject: [ECB-list] Re: [CEDET-devel] ECB/CEDET question
On Fri, 22 Oct 2004 10:28:06 -0500, "Oviedo, Javier" wrote:
> Hello all. I'm not sure exactly which group to post this to, so I=20
> thought I'd let you all decide.
>=20
> I'm using the latest ECB/CEDET with emacs 21.3.
>=20
> I have this INCREDIBLY, RIDICULOUSLY HUGE header file that I must=20
> often open in emacs. It is the main API for our entire software=20
> architecture. This thing is so BIG that it makes it impossible to use=20
> EBC/CEDET because emacs gets really, REALLY slow. Presumably, semantic
> is parsing and/or doing some processing when I move the cursor around.
>=20
> The way I see it, there are two options in getting around this
> problem:
>=20
> 1. deactivate ecb, which in turn turns off semantic.
> 2. leave ecb activated, but somehow tell semantic not to parse (or do=20
> whatever it does) this file when it is opened and visited in emacs.
>=20
> Out of these two choices, I would prefer number two because I find it=20
> very annoying to deactivate then reactivate ecb every time I visit and
> leave the file.
>=20
> How can I accomplish the second choice? Hopefully I did not missing=20
> anything to terribly obvious in the documentation.
>=20
> Is there another solution to my problem? Please feel free to chime in.
>=20
> Thanks a lot guys!
Check out the help for semantic--before-fetch-tags-hook.
It should be possible to write a hook that detects your mondo-header and
returns nil.
It should also be possible to allow this header to be parsed once,
saved, then used via the semanticdb calls for all future use, and
disabled for small updates.
Eric
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give
us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find
out more http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Ecb-list mailing list
Ecb-list@...
https://lists.sourceforge.net/lists/listinfo/ecb-list
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give
us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find
out more http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Cedet-devel mailing list
Cedet-devel@...
https://lists.sourceforge.net/lists/listinfo/cedet-devel
|