Skip to content

Check if req is included in another req #10

@franzaps

Description

@franzaps

Performance optimization if ever needed:

Relative to merging, a req can be included in another one, for example:

{authors: [a], kinds: [1]} is included in {authors: [a,b], kinds: [1,2]}

So instead of doing storage.requestCache[r.subscriptionId]![r] and cache-miss, it could find the necessary models as a subset of a model list associated to a "greater" req.

Probably wouldn't work for relays if they have a hard limit around 500-1000 events. But it would work for the request cache.

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