I have identified a performance problem with an ASP.NET application written in VB.Net running in the .Net Framework 1.1.
The application receives details of where a job is to be done and returns a list of possible appointments taking account of existing jobs, resource availability etc. Each appointment day is divided into a number of time slots (e.g. 08:00 to 13:00 etc.) any of which may overlap with any other.
When running on XP the response time is a few seconds. When running the identical source code but recompiled on Windows 2003 Server the response time is three times longer (and sometimes more). Changes to performance settings have been tried but with no effect.
A test environment has been set up with two identical machines one with Windows XP, the other with Windows 2003 Server. No other applications were hosted on the machines.
The data is held on SQL Server but the first thing the program does is read it into a number of ADO.NET DataTables within a DataSet. From then on all the data manipulation is on the DataTables and collections. The main table (with the current jobs) has a few hundred records.
All the collections and DataSets are strongly typed.
High level pseudo code follows.
Build dataset of all existing jobs, resource availability information etc. from SQL Server
For each day in the period
For each slot in day
Build a collection of jobs for the day and slot from the DataSet
Build a collection for resource availability from the DataSet
Do until all the jobs in the collection have been allocated
Do until all the jobs in the collection have a provisional allocation
Make a provisional allocation of the “best” job/resource pair
Loop
Make an allocation of the “best” provisional allocation
Update the collections to reflect the allocation
Update the DataSet to reflect the allocation
Loop
Next slot
Next day
Return a list of allocations
The question is: why does the code take 3 times longer on Windows 2003 Server in comparison with XP?
No comments:
Post a Comment