Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue with List mapping #14

Open
1Nixx opened this issue Aug 18, 2024 · 0 comments
Open

Performance issue with List mapping #14

1Nixx opened this issue Aug 18, 2024 · 0 comments

Comments

@1Nixx
Copy link
Contributor

1Nixx commented Aug 18, 2024

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.

@1Nixx 1Nixx changed the title Performance issue for List mappings Performance issue with List mapping Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant