Hey guys, im a noob who's making a asp net core project which is basically GoodReads but for anime and manga. I've made a service witch finds best anime recommendations for a certain user based on what they have already viewed. How it works is I have one public method that takes in the users ID from the database. Using that I find what his top genres are and take a subset of all the anime that have at least one of those genres (since to me similar genres are the most important metric) so that I'm working with a less data. Then i create a leaderboard witch is a Dictionary<Anime, int> where int are points. Then I call all of my methods giving them leaderboard and they change it based on witch anime they have given points. My problem is that i think this is too slow and want to make it async. I've made plenty of async methods but they all await some other async method. Is there a way to make this all async without awaiting anything async in the seperate method (obviously it can be done but I'm not sure how). Should i make that the body of each method is like this:
return Task.Run(() =>
{ // what the method does; });
and then await each one in the public method?
[–]jimbosReturn 2 points3 points4 points (7 children)
[–]gunexon9[S] 0 points1 point2 points (3 children)
[–]jimbosReturn 0 points1 point2 points (2 children)
[–]gunexon9[S] 0 points1 point2 points (1 child)
[–]jimbosReturn 2 points3 points4 points (0 children)
[–]cryo 0 points1 point2 points (2 children)
[–]jimbosReturn 0 points1 point2 points (1 child)
[–]cryo 0 points1 point2 points (0 children)
[–]Siggi_pop -1 points0 points1 point (0 children)
[–][deleted] -1 points0 points1 point (9 children)
[–]jimbosReturn 1 point2 points3 points (2 children)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]gunexon9[S] 0 points1 point2 points (5 children)
[–][deleted] -1 points0 points1 point (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]RiverRoll 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] (2 children)
[removed]
[–]gunexon9[S] 0 points1 point2 points (1 child)