On 5 Dec 2013, at 19:55, Roland King <r...@rols.org> wrote: > > On 5 Dec, 2013, at 8:34 pm, Gerriet M. Denkmann <gerr...@mdenkmann.de> wrote: > >>> >>> Don't send 2Mb of search results to your webview. Do you really need the >>> case where you search for one character only? Don't send data until you >>> have more than one and don't send obviously too much data to be useful to >>> the user. >> >> Well, the users might want all words with 'n'. In which case they would >> happily wait 50 seconds. >> I do not know how to differentiate this from a slow typing of "no". >> >> Gerriet. >> > > Would they, you sure? I don't think a good user experience has a spinning > beachball for 50 seconds during which time the UI is doing nothing even if > that does give them the final result they are looking for. Apps that > beachball (iTunes I'm looking at you) are just not good. That's even more > true if that case is the first letter of anything they type, which in your > case, it is. > > So therefore you can't dump 2Mb of text into a webview because it's going to > block up the UI for 50 seconds (really by the way, a webview takes 50 seconds > to display 2Mb of html, that's a rather long time isn't it, you sure that's > where the time is going?). So .. divide it into pages, send the first one > with a link at the bottom to the next one and load in a few good screenloads > of data at a time.
Yes, this is rather a good idea. > > Your webview stays responsive, in the usual case someone is actually looking > for a single letter, a search which, if it gives 2Mb of answers is a silly > search anyway, does get a way to page through the data and everyone else sees > the top page of data and goes 'wow this app is really quick', not knowing > that there's only few pages more actually underneath. > > And really .. 50 seconds to render 2Mb, sure you don't want to check that > again? Well, I guess I should start investigating this with Instruments. Thanks! Kind regards, Gerriet. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com