This commit is contained in:
@@ -399,6 +399,8 @@ namespace AyaNova.Util
|
||||
}
|
||||
finally
|
||||
{
|
||||
//TODO: fully async: watch the job and don't turn the state back until the job is done?
|
||||
|
||||
log.LogInformation($"Seeder: setting server state back to {wasServerState.ToString()}");
|
||||
apiServerState.SetState(wasServerState, wasReason);
|
||||
}
|
||||
@@ -570,22 +572,6 @@ namespace AyaNova.Util
|
||||
//
|
||||
public static void GenSeedWidget(ILogger log, int count)
|
||||
{
|
||||
//COMMIT BEFORE GOING NON ASYNC AGAIN TO SEE IF MEDIUM 500 WIDGETS STILL TAKES SO LONG:
|
||||
//ASYNC CACHED STUFF 2020-01-23 15:58:31.1619|INFO|Seeder|500 Widgets seeded in 54890 ms
|
||||
//NON ASYNC ORIGINAL METHOD 2020-01-23 16:19:59.9131|INFO|Seeder|500 Widgets seeded in 51442 ms
|
||||
//NON ASYNC HERE BUT CALLING ASYNC CREATE IN WIDGET: 2020-01-23 16:23:58.9478|INFO|Seeder|500 Widgets seeded in 53362 ms
|
||||
//NOT CALLING SAVE ON WIDGET BUT DOING ALL OTHER CODE: 2020-01-23 16:25:45.0293|INFO|Seeder|500 Widgets seeded in 30 ms
|
||||
//So slowness is all in the save code, let's see whats what there...
|
||||
// first tried not caching teh widgetbiz object: 2020-01-23 16:28:58.0876|INFO|Seeder|500 Widgets seeded in 53577 ms
|
||||
//so that's pointless to cache it
|
||||
//ONE LAST THING IN HERE, trying *NOT* caching the db context and create each time: 2020-01-23 16:32:13.8966|INFO|Seeder|500 Widgets seeded in 22679 ms
|
||||
// - Holy shit, that's back to where it was a few days ago, so for some reason using the same context over and over is slowing shit down drastically
|
||||
// ripping that out now.
|
||||
|
||||
//OK, making changes in CREATE code in widgetbiz
|
||||
//First removed extra save call and async db access shaved off a second
|
||||
//the commented out the Search indexer and it dropped from 22 seconds to 4.5!!!!
|
||||
//So the search indexing code is super fucking slow 2020-01-23 16:45:20.9518|INFO|Seeder|500 Widgets seeded in 4572 ms
|
||||
|
||||
var f = new Bogus.Faker();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user