interact icon indicating copy to clipboard operation
interact copied to clipboard

Improve pagination support

Open da-x opened this issue 5 years ago • 0 comments

Currently, the reflector in Interact limits the amount of data gathered for each entered expression in interact_prompt. This serves to prevent terminal overflow when trying to print large amount of data, for example if the registered state is very large. However, in order to allow easy probing of very large maps, we would need more flexibility.

  1. The limit for the amount printed data is currently a hardcoded, and we should be able to provide it in the prompt itself.
  2. To more easily navigate through sorted maps (e.g. BTreeMap), it would be nice to provide ranges. For hashmaps, we can provide how much of the iterator's items we would like to skip.
  3. Consider interactive pagination, where Reflection is an ongoing interactive process for which we are able to provide partial results before returning back to the prompt - this will be hard to implement, though.

da-x avatar Feb 15 '19 16:02 da-x