Skip to content

Performance issue with List mapping #14

@1Nixx

Description

@1Nixx

In some places, we use queryMapper not only for IQueryable mappings, but also for in-memory data mappings from one model to another.
The library provides one method to do this.
public virtual List<TTo> Map<TFrom, TTo>(List<TFrom> models, string? name = null)
However, when we start using this method for large collections, this method takes a very long time to execute.
I analyzed this code a little and the problem is that the mapping is performed for each element of the collection separately and not for the entire collection at once.
image
Need to change this logic to improve performance.

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