From 89978e1fef1eb65990f813c448ff8313a289579c Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Sat, 31 Dec 2011 23:26:02 +0000 Subject: [PATCH] Initializer implemented; some most-used data objects are preloaded from DB during the server initialization to avoid slow lazy loading while serving user requests --- FLocal.Common/SqlObject.cs | 2 +- FLocal.IISHandler/FLocal.IISHandler.csproj | 1 + FLocal.IISHandler/Initializer.cs | 139 +++++++++++++++++++++ FLocal.IISHandler/MainHandler.cs | 8 -- 4 files changed, 141 insertions(+), 9 deletions(-) create mode 100644 FLocal.IISHandler/Initializer.cs diff --git a/FLocal.Common/SqlObject.cs b/FLocal.Common/SqlObject.cs index 5d71a9a..0467d5d 100644 --- a/FLocal.Common/SqlObject.cs +++ b/FLocal.Common/SqlObject.cs @@ -77,7 +77,7 @@ namespace FLocal.Common { } } - protected void LoadIfNotLoaded() { + public void LoadIfNotLoaded() { if(!this.isLoaded) { lock(this.lockInitializer) { if(!this.isLoaded) { diff --git a/FLocal.IISHandler/FLocal.IISHandler.csproj b/FLocal.IISHandler/FLocal.IISHandler.csproj index 182e07d..f1f7388 100644 --- a/FLocal.IISHandler/FLocal.IISHandler.csproj +++ b/FLocal.IISHandler/FLocal.IISHandler.csproj @@ -156,6 +156,7 @@ +