From kde-pim Sat Mar 20 17:28:44 2004 From: Mark Bucciarelli Date: Sat, 20 Mar 2004 17:28:44 +0000 To: kde-pim Subject: Re: [Kde-pim] Writing plugin for kabc Message-Id: <200403201228.44494.mark () easymailings ! com> X-MARC-Message: https://marc.info/?l=kde-pim&m=107980410723727 On Saturday 20 March 2004 11:59 am, Cornelius Schumacher wrote: > On Saturday 20 March 2004 17:36, Tobias Koenig wrote: > > On Sat, Mar 20, 2004 at 11:13:53AM +0100, Cornelius Schumacher wrote: > > > On Saturday 20 March 2004 10:14, Tobias Koenig wrote: > > > > Yes, but only over a subset and you don't have to do all the > > > > if ( (*it).name() == xxx ) > > > > do_foo_bar(); > > > > > > If it is a subset of the data or not doesn't matter for the code > > > doing the iteration. > > > > It's not only about the iteration, it's mostly about the data that > > has to be transfered from the server to the client. > > Yes, that's a problem we have to solve. But that's exactly why we have > to separate the browsing (iteration) case and the search case (which > needs server access). If the issue is network traffic, why not create an extremely lightweight proxy object for an addressbook entry and have the server return a collection of these? The proxy accessors then can to go back to the server to get more info if the client app tries to access a field that is not in the proxy object. In huge search result sets, I would imagine that a very small subset would need to go back to the server. With this approach, no changes are necessary to client code. If the proxy can be as light as 100 bytes (name + email), 10,000 entries would require 10^6 bytes, which on a modem connection is around 200 seconds (if a modem = 5x1024 bytes/second.) Hmmm, this still seems pretty slow ... It depends on what people want to search by, I guess. I haven't been following this thread closely enough to know the use cases. If this is mainly for things like auto-completion as you type in the email address, then maybe you could get away with the first 10 characters of the name and of the email address . Regards, Mark _______________________________________________ kde-pim mailing list kde-pim@mail.kde.org https://mail.kde.org/mailman/listinfo/kde-pim kde-pim home page at http://pim.kde.org/