summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-03-24 17:33:10 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-03-25 14:03:36 -0400
commit6ec23dbb33ce40017e45df2bfc8b9a8b15f5783c (patch)
treeb33f597f3ab40af6fe80ed8c57e5c1ddcfcad910
parent63e1e52b2c049ac8b337c72b7398c906a4aea10a (diff)
SQlite store: Use g_list_prepend for performance
-rw-r--r--telepathy-logger/log-store-sqlite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/telepathy-logger/log-store-sqlite.c b/telepathy-logger/log-store-sqlite.c
index f35d25e..dd1860d 100644
--- a/telepathy-logger/log-store-sqlite.c
+++ b/telepathy-logger/log-store-sqlite.c
@@ -692,7 +692,7 @@ _tpl_log_store_sqlite_get_pending_messages (TplLogStore *self,
e = sqlite3_prepare_v2 (priv->db, "SELECT id,timestamp "
"FROM pending_messages "
"WHERE channel=? "
- "ORDER BY id ASC",
+ "ORDER BY id DSC",
-1, &sql, NULL);
if (e != SQLITE_OK)
@@ -721,7 +721,7 @@ _tpl_log_store_sqlite_get_pending_messages (TplLogStore *self,
DEBUG (" - pending id=%u timestamp=%"G_GINT64_FORMAT,
pending->id, pending->timestamp);
- retval = g_list_append (retval, pending);
+ retval = g_list_prepend (retval, pending);
}
if (e != SQLITE_DONE)