Getting rid of global objects in kdevplatform/language

David Nolden zwabel at googlemail.com
Fri May 14 13:01:19 UTC 2010


The problem is that like that, actually the creation of the
repositories is _even less_ well-defined. Before, it was always
created on shared-library loading, and now it will be created on
first-use, which may be whenever. For example, if some component uses
an IndexedString before you manually initialize the repository, it
will be initialized automatically and wrongly at some random point in
time.

About moving the .kdevduchain directory into the session directory: I
actually am not sure if this is a useful thing to do. We often need to
tell users to delete it, or for example to soft-link it to a temporary
local directory when used on a NFS share (for performance reasons), so
this may cause pain without a benefit.

Btw. your call to duchainify has wrong syntax ("--f"), so it probably
didn't build the features you requested. With those features, the
parsing should generally be _much_ slower than the times you reported.

Generally I'm ok with doing this, but I think it's not the best
possible solution to the problem. I'm not sure though what the best
solution would be. We need a well-defined point in time to initialize
the duchain repositories, which should be very early, but after we've
set the session. We at least need to make sure that any use of the
repositories before they have been initialized by us results in an
assertion.

Greetings, David




More information about the KDevelop-devel mailing list