int i;
char roomname[ROOMNAMELEN];
struct ctdlroom qrbuf;
+ struct timeval tv1, tv2, tv3;
if (IMAP->num_msgs < 1) {
return(0);
* performance drag. Fix that too.
*
*/
+ gettimeofday(&tv1, NULL);
for (i = 0; i < IMAP->num_msgs; ++i) {
if (IMAP->flags[i] & IMAP_SELECTED) {
CtdlCopyMsgToRoom(IMAP->msgids[i], roomname);
}
/* Set the flags... */
+ gettimeofday(&tv2, NULL);
i = getroom(&qrbuf, roomname);
if (i != 0) return(i);
}
}
+ gettimeofday(&tv3, NULL);
+ lprintf(CTDL_DEBUG, "Copying the pointers took %ld microseconds\n",
+ (tv2.tv_usec + (tv2.tv_sec * 1000))
+ - (tv1.tv_usec + (tv1.tv_sec * 1000))
+ );
+ lprintf(CTDL_DEBUG, "Setting the flags took %ld microseconds\n",
+ (tv3.tv_usec + (tv3.tv_sec * 1000))
+ - (tv2.tv_usec + (tv2.tv_sec * 1000))
+ );
return(0);
}