Skip to content
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

Weight recent request history matches more heavily #18

Closed
kylebebak opened this issue Nov 28, 2018 · 0 comments
Closed

Weight recent request history matches more heavily #18

kylebebak opened this issue Nov 28, 2018 · 0 comments
Assignees

Comments

@kylebebak
Copy link
Owner

kylebebak commented Nov 28, 2018

Request history uses show_quick_panel from ST's API to allow the user to fuzzy match requests on (method, url).

However, this doesn't take recency into account, which means that often requests from months ago are preferred over much more recent matches.

show_quick_panel has no API for custom weighting or ordering of matches. One way around this might be to reduce the match strength for older requests, for example by right-padding them with a random character.

The more we pad a request with some character, the weaker the match will be compared with an identical request with less padding.

The perfect character for doing this is probably the zero-width space, because it is invisible and takes up no space, which means it won't make the quick panel any wider.

The other challenge will be to create a function N = f(age), where N is the number of ZWS chars added and age is the age of the request in second.

This function should be monotonically increasing but non-linear, so it can distinguish between recent matches, perhaps those separated by only 10 minutes, but doesn't add thousands of ZWS chars to matches that are months old.

Closed by dda554a.

@kylebebak kylebebak self-assigned this Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant