Suhas Joshi,Saurabh Sablaka,Samir,Vikas Pawar
Concern:
GetSearchCompanyDetails() routine taking time.
As per New Relic logs traced during load test, for 1 call count the query took 42 seconds execute.
Locally it took 41 seconds and 11 seconds at different times.
Cause:
- GetSearchCompanyDetails business logic code has query to fetch HomePage Counters and Company Specific Image and Default Image.
- Image related data resides on respective Company Database. There is cursor to scan all Active companies and has EXEC() to fetch image details from each company database. This is what is taking the time.
Correction:
Fetching of Image related information can be avoided, as we do not show company image for Search Company Widget on Home Page.
We will keep the code block to fetch Image data conditional.
Following is the approach:
- If company data is going to get populated for list view, image data will not be fetched.
- If company data is going to get populated for grid view, where we need to show Company Logo, image data will be fetched.
After doing these changes, query executes within a second on local machine. We need to track this once again during load test.
Files Changed:
- WT\trunk\WORKTERRAweb\App\BusinessLogic\CollectionManager\CollectionManager.vb
- WT\trunk\WORKTERRAweb\Web\SharedFunctionWebTier\SharedFunctionWebTier\Models\WTHomePage\
WORKTERRAShared\SearchCompanyPVModel.cs
- WT\trunk\WORKTERRAweb\Web\WebProjects\WORKTERRA\Controllers\HomePage\SearchCompany\
SearchCompanyController.cs
- WT\trunk\WORKTERRAweb\Web\Web Projects\WORKTERRA\Models\HomePage\SearchCompany\CompanyModel.cs
Impacted Areas:
- Search Company Widget on SA / Partner / Broker/ Company Admin Home Page.
- Search Company screen via Menu / Quick link
Suhas Joshi,Saurabh Sablaka,Samir,Vikas Pawar
Concern:
GetSearchCompanyDetails() routine taking time.
As per New Relic logs traced during load test, for 1 call count the query took 42 seconds execute.
Locally it took 41 seconds and 11 seconds at different times.
Cause:
Correction:
Fetching of Image related information can be avoided, as we do not show company image for Search Company Widget on Home Page.
We will keep the code block to fetch Image data conditional.
Following is the approach:
After doing these changes, query executes within a second on local machine. We need to track this once again during load test.
Files Changed:
WORKTERRAShared\SearchCompanyPVModel.cs
SearchCompanyController.cs
Impacted Areas: