I tried out using add_term/remove_term for immediate label changes. It's
significantly faster than sync_message, but it still makes the interface
feel laggy. There's known room for improvement in Xapian's
replace_document. However, we'll still have a lot of latency when we
start using remote sup-servers, so I don't think it's a good idea to do
these index operations synchronously with the UI.

We could queue up index writes and execute them in a background thread.
We'd want label additions to show up immediately in a search, though.
This is easy to do for inbox-mode and label-view-mode, which covers most
of my daily usage. If/when we support multiple clients connecting to a
sup-server, we'll need a way to notify them that someone else modified a
message. We can implement a simple version of this now that notifies
search-results-mode after the write completes.

If we're getting rid of buffer saving, it'd probably be easiest to use a
weak-ref table so we keep at most 1 copy of each message in memory -
this would make updating messages across buffers simpler.

How is sup-server development going?
_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk

Reply via email to