touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #91945
[Bug 1394455] Re: 100ms timeout for query submission too brief
You can follow what's going on by dropping some trace into your scope.
Basically, your search() method instantiates the query, and the run()
method is called to send the query executing in a separate thread.
You are supposed to be quick in search(), just instantiating the query
instance and not doing anything else that takes any amount of time. The
shell knows that it has successfully reached your scope once your
search() method completes. In turn, the scopes runtime triggers the call
to run() in response to search() completing.
Now, the shell also sends a cancel() message if someone continues typing
and there is still a query outstanding. So, you can track what's going
on in your scope. Moreover, if you want to implement your own delay, you
can do that in run(). Wait as long as you like and, in your cancel()
method (which is delivered on a separate thread, so you get the callback
even if run() is still executing.)
So, the strategy would be to have a delay in run() and to not actually
fire the real query to the back-end if no cancel arrives for some amount
of time. That way, you can basically implement your own delay without
depending on the one used by the shell.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity-scopes-shell in
Ubuntu.
https://bugs.launchpad.net/bugs/1394455
Title:
100ms timeout for query submission too brief
Status in unity-scopes-api package in Ubuntu:
Invalid
Status in unity-scopes-shell package in Ubuntu:
Confirmed
Status in unity8 package in Ubuntu:
Incomplete
Bug description:
There is currently a 100 ms timeout between keypresses and query
submission. This is rather short and ends up submitting many queries
while the user is still typing a delay of ~300 ms would eliminate many
of these submissions while still being barely noticeable.
See this thread for further discussion: https://lists.launchpad.net
/ubuntu-phone/msg10361.html
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity-scopes-api/+bug/1394455/+subscriptions
References