Getting rid of global objects in kdevplatform/language

David Nolden zwabel at googlemail.com
Fri May 14 13:23:34 UTC 2010


2010/5/14 Milian Wolff <mail at milianw.de>:
> David Nolden, 14.05.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.
>
> I don't see how that is more random nor why it's worse in any way ;-) What is
> wrong with init-on-first-use? You didn't need it before after all ;-)

The problem with on-first-use is that it may be _too early_.

>> 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.
>
> I doubt the "much". If the impact is so small in the default flag (which is
> btw. also the default for KDevelop), it won't blowup by magnitudes in the
> full-blown case.
It is a huge difference whether you build the uses or not. With the
standard args, the uses are not built, and not even the local
declarations are built. The relative influence of the changes to the
performance may be similar, I just wanted to state that the test
didn't exactly test what Andreas thought it would test (I guess).

Greetings, David




More information about the KDevelop-devel mailing list