Side note, I had an hilarious performance problem recently with CEDET. I
was working on a project with a lot of macro magic and wanted to see the
preprocessor output and so started using --save-temps to trivially grab
the .i files I wanted. Later I noticed weird random hangs in Emacs for
around 10s and after a bunch of experimenting traced it down to a 26M
.semanticdb cache file, which kept getting regenerated over time. Later
on I noticed semantic was parsing the .i files in the directory and as
far as I can tell that was the source of the hang; deleting the .i files
has stopped the problem.
m.
-----Original Message-----
From: Eric M. Ludlam [mailto:eric@...]
Sent: Thursday, January 28, 2010 10:19 PM
To: Michael Reiher
Cc: cedet-devel@...;
cedet-semantic@...
Subject: Re: [cedet-semantic] Possible completion problem
Hi Michael,
Sorry for the very long delay.
I have finally found a way to solve this problem that I am happy with.
The simplicity of the solution belies the amount of time it took me to
figure it out.
I've adopted your example below into the test suite, and this class of
issue should now be work well for C++.
For those following along at home, if this results in a
performance/speed issue for you, please let me know. Typecaches can be
very large, and this has the potential to slow things down a little.
Any evidence or examples (preferably on Linux) would be helpful if this
becomes true for you.
Thanks
Eric
On 11/27/2009 11:06 AM, Eric M. Ludlam wrote:
> Hi Michael,
>
> I think the problem here is that when the internal typecache is
> created, it does not treat the declaration of Private the type as
> belonging to AAA the same way as it handles the case for classes in
> namespaces. It does know a little about methods declared similarly,
but
> methods don't need the implementation available since the prototype is
> usually sufficient.
>
> I don't see a quick fix for this at the moment. I'll keep this on
my
> list of things to work on.
>
> Thanks
> Eric
>
> Michael Reiher wrote:
>> Hi
>>
>> Possibly I found a case that semantic can't interpret correctly. The
problem
>> is when trying to complete members of "d" in AAA::aaa() in the
example below.
>> Semantic doesn't seem to know any. When looking at the output of
semantic-
>> adebug-analyze it seems all sematic knows about "d" is that it's of
type
>> "class Private*". It ignores however the definition of the class in
the same
>> file.
>>
>> Greets Michael
>>
>>
>> ------ aaa.h ---------------------------------
>>
>> class AAA
>> {
>> public:
>> AAA();
>>
>> void aaa();
>>
>> private:
>> class Private;
>> Private * const d;
>> };
>>
>> ------ aaa.cpp ------------------------------
>>
>> #include "aaa.h"
>> #include "bbb.h"
>>
>> class AAA::Private
>> {
>> Private() : bbb(0) {
>> }
>>
>> BBB* bbb;
>> };
>>
>> void AAA::aaa()
>> {
>> d->_; // _ is position of cursor
>> }
>>
>> --------------------------------------------------
>>
>>
------------------------------------------------------------------------
------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
>> trial. Simplify your report design, integration and deployment - and
focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now. http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> cedet-semantic mailing list
>> cedet-semantic@...
>> https://lists.sourceforge.net/lists/listinfo/cedet-semantic
>>
>
>
------------------------------------------------------------------------
------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
> trial. Simplify your report design, integration and deployment - and
focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> cedet-semantic mailing list
> cedet-semantic@...
> https://lists.sourceforge.net/lists/listinfo/cedet-semantic
>
------------------------------------------------------------------------
------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the
business
Choose flexible plans and management services without long-term
contracts
Personal 24x7 support from experience hosting pros just a phone call
away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
cedet-semantic mailing list
cedet-semantic@...
https://lists.sourceforge.net/lists/listinfo/cedet-semantic
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
|