[MGNLPER-80] Abandon searches if results are not needed anymore Created: 21/Jan/19 Updated: 11/Feb/19 Resolved: 31/Jan/19 |
|
| Status: | Closed |
| Project: | Periscope |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.1 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Cedric Reichenbach | Assignee: | Cedric Reichenbach |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 0.5d | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Epic Link: | Periscope improvements | ||||
| Sprint: | Foundation 3 | ||||
| Story Points: | 5 | ||||
| Description |
|
Whenever a search has been triggered, there's no way to stop it with the current API. In a situation where results will never be needed anymore, this is a waste of resources and in particular delays new searches. What Find Bar does in such a situation (e.g. after a search has been triggered after user input, but a subsequent one too because the user typed ahead) is to just ignore any obsolete results coming in and wait for the new ones. If a user manages to type at roughly the same frequency as input debouncing (5 chars per second), many sequential searches are triggered, leading to a queue and considerably delaying final results. Potential solution: Add a method to Periscope to cancel a running search (e.g. by some identifier, or some other handle). Internally, we could just avoid starting queued search threads, and potentially kill current ones (but that may be dangerous too). |