[Xapian-devel] the run time about add_document

Yanxiong Lu yanxionglu at gmail.com
Wed May 28 09:49:13 BST 2014


hi,there

I use xapian to build index,I found add_document cost lots of time(I did
not use commit).
In my computer, add one doc cost more then 60ms. It's a huge number for me
to add one doc.

*so, do you have some solutions to improve this?*


This is my code:

gettimeofday( &start, NULL );

Xapian::docid did = db->add_document(doc);
if (did % 5000 == 0)
    printf("docid: %d\n", did);

gettimeofday( &end, NULL );
timeuse = 1000000 *( end.tv_sec - start.tv_sec ) + end.tv_usec -
start.tv_usec;
printf("add time used: %d us\n", timeuse);

*add time used: 63373 us*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20140528/0f80577f/attachment.html>


More information about the Xapian-devel mailing list