In my ASP.NET-MVC-application I store information in static classes with static vars. But ASP.NET is recycling all data and threads after and my "App_Start"-procedure will call after the cleanup.
I solved the problem with the backup-tasks with HangFire. But to generate the static-class, I need a long time. The first request after the recycle has to wait while the static-classes are set up.
Why the delay? I am using the EntityFramework and for correct handling I need all records from the database with their relations. So I hold all records with static-classes and use the database as 2nd strategy.
I have no ideas what I can do to improve performance. My first idea was to serialize the complete data - but how is the performance for deserialize a ArrayList with 2K or more records? Is there a way to prevent the recyclefor my static ArrayList?