Translate Runner

Aaron J. Seigo aseigo at kde.org
Sun Mar 16 17:53:48 CET 2008


On Sunday 16 March 2008, Matej Svejda wrote:
> I have one question though: Wouldn't in that case having one instance per
> runner be faster then overlapping queries?

as long as then there is a guarantee that runners are never being queried more 
than once at any given time; i don't want to have to make individual runners 
reentrant.

> It just seems so odd having two 
> instances of the same runner since that means one of them is doing work for
> nothing since it's result will never get displayed...

the upside is that you get results that more accurately reflect what the user 
is typing because you aren't waiting for the old results (which will just be 
discarded anyways) to be finished before getting more: they just appear as 
soon as they are possible. it comes at the expense of losing cycles to 
matches that will never get used, but the results are more timely.

the alternative is to have the results appear slower (due to having to wait 
for runs to be complete before starting a new run), though in practice if 
this results in thread contention it's probably not a win.

but no matter when a runner starts its matching, those values may not be 
accurate if the user continues typing. the only way to achieve 100% 
efficiency is to not match until the user stops, which either means a pause 
after typing (and if they start typing again after that pause period, you're 
back to square 1) or when they hit a "search" button in the UI.

so we're trading some cycles for fluidity.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080316/2d753f50/attachment.pgp 


More information about the Panel-devel mailing list