hassanhabib / Refugee.Core

This is an API to help support refugees everywhere around the world.
MIT License
19 stars 18 forks source link

DESGIN: Optimize performance for large amount of data ? #87

Open Sharaf-Mansour opened 2 years ago

Sharaf-Mansour commented 2 years ago

Issue

The current model uses IList<T> Or IEnumerable<T> Which is good for 1000 to 10,000 Refugees, But my question is what if we have a lot more. Is there a room to use Span<T> Or Something else ?

bramburn commented 2 years ago

I would just use a limit in the query return from the database. you might want to look at data structures. in terms of difference: https://www.dotnettricks.com/learn/linq/ienumerable-vs-ilist

10,000 records is nothing, in terms of getting the data, I would look at implementing pagination for the queries.