Very slow TDBPlannerMonthView with many records

Hi!


I'm developing a Calendar application for a barbershop but I have a problem with performance. It takes about 13-14 seconds to run the application and show the events in the calendar.

I'm trying with about 1200 events per month (1 appoiment each 15 minutes approx.).

The problem is that I have 4 DBPlanners in the Form: 
- 1 TDBPlannerMonthView (current month view)
- 1 TDBPlanner (current week view)
- 1 TDBPlanner (current day view)
- 1 TDBPlanner (current year view)

I created a blank application for my testings with some buttons. Each button "opens" a different planner:
- The DBPlannerMonthView opens and shows instantly.
- The week planner takes about 4 seconds
- The day planner takes about 4 seconds
- The year planner takes about 4 seconds

I use a single (already open) table and then open the several TDBDaySource when needed with those buttons.

I have tried to use BeginUpdate/EndUpdate with no effect (I don't know if that helps in a datasourced DBPlanner or maybe I don't know where to use it in the code).

Also tried with a Query instead of a Table, but that's not the problem. DBPlannerMonthView is really fast showing an entire month, but even the day view dbplanner takes 4 seconds to display a single day.

Is there any trick I can do to test?

Thanks

Luis C.

In our Planner demo 31 you can see how fast the TDBPlanner is for 1200 items and 200 resources. It is instant.

So, there must be something specific you do that causes this. Perhaps you use any of the Planner event handlers that is taking up this time?

Hi, Bruno.


The problem is that I was using the SAME Table/Datasource component for the four different TDBDaySource components. If I use a different Table/Datasource for each DBDaySource/DBPlanner, then it loads instantly!

I will make some tests to make sure that's the problem.

Thanks!

Luis C.