From mboxrd@z Thu Jan 1 00:00:00 1970 From: rlane@club.cc.cmu.edu (Rich Lane) Date: Sat, 01 Aug 2009 02:28:19 -0400 Subject: [sup-talk] xapian question In-Reply-To: <1248807365-sup-4965@masanjin.net> References: <1248716325-sup-7534@masanjin.net> <1248795865-sup-6634@pion.club.cc.cmu.edu> <1248807365-sup-4965@masanjin.net> Message-ID: <1249098509-sup-6664@pion.club.cc.cmu.edu> 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?