mu: optimize indexing (get_uid_term)

Some users were report seeing get_uid_term high in the profiles; so
optimize this:

- make mu_util_get_hash a static inline function (used by get_uid_term)
- don't use 'realpath' in get_uid_term, seem that's the main culprit
- some slight faster string handling there too.
This commit is contained in:
djcb
2015-11-17 10:55:56 +02:00
parent dba2e50979
commit fe8b3430c6
4 changed files with 26 additions and 39 deletions

View File

@ -177,7 +177,8 @@ public:
mu_contacts_clear (_contacts);
}
std::string get_uid_term (const char *path) const;
// not re-entrant; stays valid until called again
const char *get_uid_term (const char *path) const;
MuContacts* contacts() { return _contacts; }