Reuse QString instances in parseAddrList
Review Request #106836 - Created Oct. 13, 2012 and submitted
Leverage QString implicit sharing to reduce memory consumption. In my tests, the memory decreases roughly by ~20MB from a total of 300 down to about 280MB. My question is rather, whether this really needs to be thread safe or not. Maybe also some performance testing is required?
Ran KMail, not noticeably slower but uses less ram. Nothing else seems to have changed.
Currently there's only one user of ItemFetchJob (and thus this code) in threads I'm aware of, the legacy KRes compat bridges. Since it's supported and working, I think we need the mutex to keep it that way, even if not used much right now. I've looked at KMime AddrSpec/Mailbox, which probably should be changed to storing the joint version rather than three parts, but that can't be easily done in a BC way, the members are not in a private class.
Review request changed
added memory profiles before/after patch