Skip to content

Add in scanLimit() to Map? #318

@ByronBecker

Description

@ByronBecker

The source this map was taken from has a scanLimit() functionality.

Since the Map is balanced and sorted, having a scan allows someone to paginate through the map which is especially useful for larger data sets or in performance restricted environments. It's one of the super powers of the data structure.

If you'd like to modify the API, I'd recommend keeping:

  • a start point to iterate from
  • an end point (to stop iterating)
  • direction (forward/backward) of pagination
  • a limit (to force the user to use pagination and think in terms of ICP canister resource limits)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions