Added Task.Yield call to category top tagging portion.
This commit is contained in:
parent
6c684372df
commit
d5c89fa6ca
@ -131,11 +131,14 @@ namespace MultiShop.Client.Pages
|
|||||||
searching = false;
|
searching = false;
|
||||||
searched = true;
|
searched = true;
|
||||||
|
|
||||||
|
int tagsAdded = 0;
|
||||||
foreach (ResultsProfile.Category c in greatest.Keys)
|
foreach (ResultsProfile.Category c in greatest.Keys)
|
||||||
{
|
{
|
||||||
foreach (ProductListingInfo info in greatest[c])
|
foreach (ProductListingInfo info in greatest[c])
|
||||||
{
|
{
|
||||||
info.Tops.Add(c);
|
info.Tops.Add(c);
|
||||||
|
tagsAdded += 1;
|
||||||
|
if (tagsAdded % 50 == 0) await Task.Yield();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user