IndexedString vs. implicit sharing

Andreas Pakulat apaku at gmx.de
Wed Oct 17 18:52:22 UTC 2012


Hi,

On Wed, Oct 17, 2012 at 7:30 PM, Milian Wolff <mail at milianw.de> wrote:
> Now, who is up for fixing IndexedString to leverage implicit sharing? Sadly I
> still don't really understand the itemrepository magic.

I don't understand it either, except that IIRC the main point of
indexedstring is to have an object which can be serialized very easily
and quickly to the duchain-disk-representation. In particular in
memory its just an index into the repository, so extremely memory
efficient. Adding implicit sharing doesn't gain you much in that case.

> But couldn't we use
> QString's in there directly?

That would mean keeping all the bits/bytes for a QString in memory,
which was the whole reason for dropping their use.

> Maybe that would require us to make IndexedString
> only operate on QString's but I'd be all for that anyways to increase type
> safety. But well, food for though...

What kind of type-safety do you gain by replacing IndexedString with QString?

Andreas




More information about the KDevelop-devel mailing list