title: Asp.net core 2.2 slow upon first request
body: <p>The first request takes time to hit the server API method because it pre-building the services in a start-up task can anyone suggest me to reduce the initial latency of my first request after published in IIS</p>
  
  <pre><code> // This method gets called by the runtime. 
              // Use this method to add services to the container.
              public void ConfigureServices(IServiceCollection services)
              {
                 services.AddTransient&lt;IContactService, ContactService&gt;();
                 services.AddTransient&lt;IPersonService, PersonService&gt;();
                 services.AddTransient&lt;IDashboardService, DashboardService&gt;();
                 services.AddTransient&lt;IEmployeeService, EmployeeService&gt;();
                 services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
  
                  // In production, the React files will be served from this directory
                  services.AddSpaStaticFiles(configuration =&gt;
                  {
                      configuration.RootPath = "ClientApp/build";
                  });
              }
  </code></pre>
  
  <p>Need to inject more than 100 services its taking time to prebuilding.</p>