A great optimization, I believe, would be to memoize the source update results depending on the input.
Example:
- Type "foo", takes 10s to compute.
- Type "bar", takes 15s to compute.
- Type "foo" again.
With the current prompter, the last "foo" would take another 10s. With memoization, it would be instantaneous.
In terms of memory, I don't believe it's a big deal since prompters are short-lived objects.
A great optimization, I believe, would be to memoize the source
updateresults depending on the input.Example:
With the current
prompter, the last "foo" would take another 10s. With memoization, it would be instantaneous.In terms of memory, I don't believe it's a big deal since prompters are short-lived objects.