Skip to content

[PERF] IdResolver and RoutingResolver closure allocations #7664

Open
@stevejgordon

Description

@stevejgordon

The IdResolver and RoutingResolver types cache lookup functions but, in doing so, cause closure classes to be allocated per document whenever we infer the Id or Route for an object instance. This is most evident during bulk operations. For example, here are the excess allocations caused by a BulkAll request that indexes 100k documents.

image

We should revisit the code in these resolvers to review if we can:

a) avoid capturing local variables and therefore allocating closures
b) optimise further (when the platform supports it) using IL emit etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions