You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_logger.LogWarning($"GetProfileEditorAffiliations is slow. userprofileId={userprofileId}, forElasticsearch={forElasticsearch}, {affiliations.Count} items in {stopwatch.ElapsedMilliseconds}ms.");
_logger.LogWarning($"GetProfileEditorEducations is slow. userprofileId={userprofileId}, forElasticsearch={forElasticsearch}, {educations.Count} items in {stopwatch.ElapsedMilliseconds}ms.");
_logger.LogWarning($"GetProfileEditorEmails is slow. userprofileId={userprofileId}, forElasticsearch={forElasticsearch}, {emails.Count} items in {stopwatch.ElapsedMilliseconds}ms.");
_logger.LogWarning($"GetProfileEditorExternalIdentifiers is slow. userprofileId={userprofileId}, forElasticsearch={forElasticsearch}, {externalIdentifiers.Count} items in {stopwatch.ElapsedMilliseconds}ms.");
_logger.LogWarning($"GetProfileEditorFundingDecisions is slow. userprofileId={userprofileId}, forElasticsearch={forElasticsearch}, {fundingDecisions.Count} items in {stopwatch.ElapsedMilliseconds}ms.");
_logger.LogWarning($"GetProfileEditorKeywords is slow. userprofileId={userprofileId}, forElasticsearch={forElasticsearch}, {keywords.Count} items in {stopwatch.ElapsedMilliseconds}ms.");
_logger.LogWarning($"GetProfileEditorOtherNames is slow. userprofileId={userprofileId}, forElasticsearch={forElasticsearch}, {otherNames.Count} items in {stopwatch.ElapsedMilliseconds}ms.");
_logger.LogWarning($"GetProfileEditorPublications is slow. userprofileId={userprofileId}, forElasticsearch={forElasticsearch}, {publications.Count} items in {stopwatch.ElapsedMilliseconds}ms.");
@@ -216,13 +215,10 @@ public async Task<List<ProfileEditorActivityAndReward>> GetProfileEditorActivies
216
215
LinkType=wl.LinkType??""
217
216
}).ToList()
218
217
}).AsNoTracking().ToListAsync();
219
-
stopwatch_researchActivityDtos.Stop();
220
-
_logger.LogInformation($"GetProfileEditorResearchActivities. SQL query for researchActivityDtos got {researchActivityDtos.Count} items and took {stopwatch_researchActivityDtos.ElapsedMilliseconds}ms.");
@@ -297,14 +293,11 @@ public async Task<List<ProfileEditorActivityAndReward>> GetProfileEditorActivies
297
293
LinkType=wl.LinkType??""
298
294
}).ToList()
299
295
}).AsNoTracking().ToListAsync();
300
-
stopwatch_profileOnlyResearchActivityDtos.Stop();
301
-
_logger.LogInformation($"GetProfileEditorResearchActivities. SQL query for profileOnlyResearchActivityDtos got {profileOnlyResearchActivityDtos.Count} items and took {stopwatch_profileOnlyResearchActivityDtos.ElapsedMilliseconds}ms.");
302
296
303
297
/*
304
298
* Batch load child identifierless data.
305
299
* One query replaces 4 correlated subqueries per row across both DTO lists.
306
300
*/
307
-
varstopwatch_childLookup=Stopwatch.StartNew();
308
301
List<int>allParentIds=researchActivityDtos
309
302
.Concat(profileOnlyResearchActivityDtos)
310
303
.Where(d =>d.DimIdentifierlessData_Id>0)
@@ -338,16 +331,13 @@ public async Task<List<ProfileEditorActivityAndReward>> GetProfileEditorActivies
338
331
}
339
332
}
340
333
}
341
-
stopwatch_childLookup.Stop();
342
-
_logger.LogInformation($"GetProfileEditorResearchActivities. Batch child lookup took {stopwatch_childLookup.ElapsedMilliseconds}ms.");
343
334
344
335
/*
345
336
* Research activity deduplication.
346
337
* Deduplication is based on start year and name properties.
347
338
* Remove items from profileOnlyResearchActivityDtos which duplicate items from researchActivityDtos.
348
339
* Comparison is done by computing a key for each research activity based on start year and translated name FI, and comparing the keys.
_logger.LogWarning($"GetProfileEditorResearchActivities is slow. userprofileId={userprofileId}, forElasticsearch={forElasticsearch}, {activitiesAndRewards.Count} items in {stopwatch.ElapsedMilliseconds}ms.");
0 commit comments