-
-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable quick and complete cancellation of running searches #642
Enable quick and complete cancellation of running searches #642
Conversation
Here is the output of console log running the above on two title searches in succession. The first is for "unesco world heritage site"; after a short time this is quickly replaced with "unesco world heritage". The former search is complex with many variations searched, and it is replaced by a simpler search. Asterisks indicate where the first search was cancelled, and where the cancellation was registered - note that it is after the global search object has been changed, which proves that the running search object in Hence, we have an effective signalling mechanism without recourse to "super-global" objects, and it is sufficient to pass all the needed information to zimArchive in a single |
I'm listing here the stages I mentioned in #637. I believe they have all been implemented, but I'll tick them off as I check through them before removing Draft status for this PR:
|
@mossroy I have checked over the code (see checkboxes above) and added a short technical explanation of how the object assignment works between the different scopes, as it may be useful to my future self or other future devs encountering the code. But otherwise, this is ready for review. It effectively completes #617 (which was merged despite the known issue) by implementing #637. NB I have left in (for now) I will delete diagnostic console logging before squash/merge once the code is approved. |
I'm not forgetting this PR, and will review it as soon as I can. |
No rush, I sympathize -- things going crazy here too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to be working well on my FirefoxOS device.
I added a few minor remarks
This is proof-of-concept code for the first part of the PR title (cancellation of running searches). It implements #637 and is in draft, for testing.
Because I believe the techniques and solution are the same, I intend to address #426 in this PR as well.
The code currently contains console log reports to prove that it cancels title search completely. They will be removed at a later stage.