Revision 94d266f...

Go back to digest for 24th November 2013

Optimization in KDE-PIM

Jan Kundrát committed changes in [trojita] /:

tree: Use tagged pointers to save memory

This change exploits the fact that the TreeItem structure has to be aligned,
typically to four or 8 bytes. This means that the m_parent cannot ever have the
couple of lowest bits set, so we can merge the m_fetchingState and m_parent into
a single member variable and save memory by that.

REVIEW: 114018

File Changes

Modified 6 files
  •   CMakeLists.txt
  •   src/Imap/Model/MailboxTree.cpp
  •   src/Imap/Model/MailboxTree.h
  •   src/Imap/Model/Model.cpp
  •   src/Imap/Tasks/KeepMailboxOpenTask.cpp
  •   src/Imap/Tasks/ObtainSynchronizedMailboxTask.cpp
6 files changed in total