Allright, i read some more docs, and here is the breakdown:

QHash::values() does create a new list by iterating the items everytime it is 
called, so that's not too good.
also foreach loops do not work well on QHash.

But: 
metaContacts() is not acutally called as often as i thought: it appears 4 
times in the main code, 2 times in plugins and 4 times in the dcop interface 
which i do not count as it needs to go away/be rewritten anyways.
so we could either: 
1. leave it using values() // not the fastest, but easy iterating
2. hand out a QHash instead of QList // iterating is not _that_ elegant (no 
foreach), but fast! since there is not that much code using it, i wouldn't 
mind doing the job of porting the affected classes
3. generate a list everytime a metacontact is inserted/removed and hand out 
copies of that // runtime probably ok, external interface stays, but probably 
_very poor_ startup performance (when adding all the meta contacts)

i vote for 2 :)

thoughts?

regards, conrausch
-- 
[EMAIL PROTECTED]
http://conrausch.doesntexist.org
JabberID: [EMAIL PROTECTED]

# support cryptography! public key:
http://elise.no-ip.com/ch.gmx.asc

Unix weanies are as bad at this as anyone.
             -- Larry Wall in <[EMAIL PROTECTED]>

Attachment: pgpsMZOPOCryw.pgp
Description: PGP signature

_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to