What is notmuch compact and should I use it?

classic Classic list List threaded Threaded
5 messages Options
Attic Hermit Attic Hermit
Reply | Threaded
Open this post in threaded view
|

What is notmuch compact and should I use it?

I read the manuals of Notmuch and encountered notmuch-compact. The
manual says that it compacts the notmuch database and it will enhance
the performance of Notmuch.

What exactly is to compact the database? I noticed that the size of the
notmuch database is shrunk after `notmuch compact`, but I don't think
this procedure is gzipping the database. I thought it is something like
the garbage collecting, but I'm not sure.

And should I use it regularly? if it is, how often should it be done?
--
Attic Hermit
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: What is notmuch compact and should I use it?

Attic Hermit <[hidden email]> writes:

> What exactly is to compact the database? I noticed that the size of the
> notmuch database is shrunk after `notmuch compact`, but I don't think
> this procedure is gzipping the database. I thought it is something like
> the garbage collecting, but I'm not sure.

Yes, that's approximately correct; notmuch compact is essentially
equivalent to xapian compact

     https://xapian.org/docs/admin_notes.html#compacting-a-database
     
> And should I use it regularly? if it is, how often should it be done?

There is some tradeoff: search should be faster after a compact, but
indexing many messages will likely be slower. For most people this
doesn't matter too much since the number of messages added after the
original index is relatively small.

d

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Attic Hermit Attic Hermit
Reply | Threaded
Open this post in threaded view
|

Re: What is notmuch compact and should I use it?

David Bremner <[hidden email]> writes:

> There is some tradeoff: search should be faster after a compact, but
> indexing many messages will likely be slower.

Maybe I'm wrong, but is it meaning that it will be taking a long time to
compact many messages, or after doing `notmuch compact`, indexing many
new messages will be slower because of the compacted database?

--
Attic Hermit
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: What is notmuch compact and should I use it?

Attic Hermit <[hidden email]> writes:

> David Bremner <[hidden email]> writes:
>
>> There is some tradeoff: search should be faster after a compact, but
>> indexing many messages will likely be slower.
>
> Maybe I'm wrong, but is it meaning that it will be taking a long time to
> compact many messages, or after doing `notmuch compact`, indexing many
> new messages will be slower because of the compacted database?

The latter, according to the xapian documentation.

d
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Attic Hermit Attic Hermit
Reply | Threaded
Open this post in threaded view
|

Re: What is notmuch compact and should I use it?


All things are clear now. Thank you!

David Bremner <[hidden email]> writes:

> Attic Hermit <[hidden email]> writes:
>
>> David Bremner <[hidden email]> writes:
>>
>>> There is some tradeoff: search should be faster after a compact, but
>>> indexing many messages will likely be slower.
>>
>> Maybe I'm wrong, but is it meaning that it will be taking a long time to
>> compact many messages, or after doing `notmuch compact`, indexing many
>> new messages will be slower because of the compacted database?
>
> The latter, according to the xapian documentation.
>
> d
--
Attic Hermit
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch