* lib: for sorting dates, use the strings as recorded in Xapian, rather than

converting to time_t; this saves ~ 5% when we list threaded results
This commit is contained in:
djcb
2012-09-19 16:55:44 +03:00
parent 9e6566989a
commit 6c071d940b
2 changed files with 14 additions and 5 deletions

View File

@ -67,7 +67,13 @@ mu_msg_doc_get_str_field (MuMsgDoc *self, MuMsgFieldId mfid)
{
g_return_val_if_fail (self, NULL);
g_return_val_if_fail (mu_msg_field_id_is_valid(mfid), NULL);
g_return_val_if_fail (mu_msg_field_is_string(mfid), NULL);
// disable this check:
// g_return_val_if_fail (mu_msg_field_is_string(mfid), NULL);
// because it's useful to get numerical field as strings,
// for example when sorting (which is much faster if don't
// have to convert to numbers first, esp. when it's a date
// time_t)
try {
const std::string s (self->doc().get_value(mfid));