Skip to content

Rendering a large collection using CollectionBinder can tie up the browsing context #224

Description

@platinumazure

Rendering a large collection can tie up the browsing context and generate long-running script errors.

It's pretty obvious that consumers with large collections should also consider partitioning/paginating their collections to make for an acceptable user experience. However, for consumers that are okay with rendering things in batches, it would be a good idea for CollectionBinder to support some sort of renderBatchSize option (or similar) and render in chunks of that size, calling setTimeout to return control back to the browser temporarily in between. If that option is not specified, all items would render synchronously. Ideally, this logic would activate both on initial bind calls and every time a collection add occurs with more than renderBatchSize models being added.

I'll work on a pull request along these lines in the next couple of days, but if anyone wants to have a go before I do, feel free.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions