Comment posted by Steve M.
12 years ago.
"1) We only show one day at a time, but have a calendar built for each person returned. (we now limit this to 6 at a time). The validation is not so much on the date but all the metrics that go with each event. We number of units associated, total time of the event and other various checks that are required. We could have as few as 5 events per calendar to 20 events per calendar."
"2) We only returns events for the date and people selected."
Ok, this helps clarify certain details. So I'm going to re-iterate your description, just to ensure that I understand what you are doing:
1. Page has (up to) six Calendar controls.
2. Page loads, and you do a data fetch for the first person. (Let's assume you are not returning an obscene amount of data.)
3. You perform some server-side validation on the returned data.
4. Assuming the validation in Step 2 passes, the page continues to load and initialize the Calendar object -- which has its own callback to fetch data (also assuming there is not an obscene amount of data).
At this point, you've done two database hits. Then you multiply that by (up to) five times for the additional people, because each has their own two-hit logic.
Couple of thoughts:
1. Use a profiler tool to look at the query time and execution plan of your fetch logic. Could that be refactored or tuned?
2. How wide and tall is each data call? Are you bringing back more data than what is needed or could be shown?
3. Does the performance improve when the fetch is abstracted to a stored proc, a view, or some other cached/optimized call?
HOWEVER... There is this comment:
"3) These can be separated to a point, but then need to be merged back together for the final display."
So now it sounds like you don't have (up to) six individual Calendar controls, but one. So if that is the case, and you know the date and people to display, are you just doing too many hits solely because the number of people you are evaluating? This is starting to sound like an exponential performance degradation, instead of a linear performance degradation.
"having the ability to insert dates into a calendar via javascript in the client side would be a big win."
Do you mean to add new events to the calendar, or update the calendar's display date? If it's the latter, then I had the same question answered here:
http://forums.daypilot.org/Topic.aspx/1735/asp-net-mvc3----how-to-update-startdate-field-from-jquery-d