We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Performance of DateTimePickerExt

Thread ID:

Created:

Updated:

Platform:

Replies:

9862 Jan 14,2004 07:30 AM Apr 5,2004 12:35 PM Windows Forms 11
loading
Tags: Tools
Stefan Lundberg
Asked On January 14, 2004 07:30 AM

Hi. I''m optimizing performance in an application and find that the DateTimePickerExt (DateTimePickerAdv) is extremely slow compared to other controls on our forms. Some of the forms have many controls and we have too long loading time of these. When profiling I see that the DateTimePicker is responsible for ~80-90% of the time in a form with ~30 controls. Almost all of the time is in the datetimepicker and down in get_Calendar etc. even though I haven''t dropped it. This is on both 1.6.1.8 and 2.0.2.0. How can we make this initialization time shorter? Will this be fixed later in version 2. We are looking on version 2 since it shall have better menu performance. Regards Stefan

Administrator [Syncfusion]
Replied On January 14, 2004 10:19 AM

Hi Stefan, Thanks for bringing this to our attention. This problem occurs only when the DateTimePicker is added to the Form through the designer, since in this case the Calendar control gets created eventhough it is not in use. The Calendar control in the DateTimePickerExt/DateTimePickerAdv internally uses a GridControl. Hence the initialization time of this Control is considerably high when compared to our other controls. The workaround here would be comment out/remove all the designer generated code related to the DateTimePickerAdv''s Calendar in the Form''s InitializeComponent method. This would ensure that the Calendar is not created initially when the application loads and hence the application initialization time would be minimized to a great extent. Please try this and let me know if this meets your requirements. Regards, Guru Patwal Syncfusion, Inc.

Stefan Lundberg
Replied On January 15, 2004 07:10 AM

Hi Guru. I have tested this by commenting out the calendar related code and got improved performance, thanks. I haven''t done the final solution where this code is applied later on (when dropping the calendar..?) since I guess it is needed then. Thanks again. Regards Stefan ps. Maybe this change should be done in the Syncfusion Tools.. ds.

Administrator [Syncfusion]
Replied On January 15, 2004 09:12 AM

Hi Stefan, You do not have to explicitly add code to create a DateTimePickerAdv Calendar at a later stage when you wish to use the dropdown Calendar. This is code will be generated automatically. However, the Calendar display is slightly slower for the first time since it takes time for initialization and JIT compiling. But it works fine for the subsequent usages. Please let me know if you need any other information. We appreciate your feedback on this issue. Regards, Guru Patwal Syncfusion, Inc.

Stefan Lundberg
Replied On January 16, 2004 01:42 AM

Hi and thanks for your response. I''ve checked more on this and with your current implementation I have to reinitiate a number of values when the popup is shown (MonthCalendarExt). Even though these are set initially. We do some customizations, null button, max/min dates etc but I cannot understand the implementation in DateTimePickerExt. In all properties there are checks for this ''this.monthCalendar!=null'', ok that''s fine. There is a store ''DateTimePickerExtCalendarStore'' that holds these values but the store isn''t updated correctly. See methods ''InitializeCalendarStore'', ''InitializePopup'', ''EnableNullDate'', ''MinValue'', ''MaxValue'' (etc). Why isn''t this.cStore updated? When the popup is initialized old data is used. As I see it the intended functionality doesn''t work and I have to implement what I have described in previous posts. Best regards Stefan

Stefan Lundberg
Replied On January 16, 2004 06:58 AM

Hi, The problem I find is that the None button is shown even though I''ve set that is shouldn''t be. I''ve added this code and want your opinion if this is correct or not. Have I misunderstood the complete problem and is doing something wrong? (sorry about word wraps) protected override void OnOnPopup(System.EventArgs e) { base.OnOnPopup(e); // We have delayed our creation of the dropdown calendar to get faster form loads. // Syncfusion does though not initialize the calender correctly so we need this code // to set some properties again.. // See this post: http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=9862 (''Performance of DateTimePickerExt'') if( !this.m_calendarInitialized ) { this.m_calendarInitialized = true; base.EnableNullDate = !base.EnableNullDate; base.EnableNullDate = !base.EnableNullDate; // base.MinValue = base.MinValue; // base.MaxValue = base.MaxValue; } } Don''t know if Min/MaxValue is a problem but it is handled incorrect as EnableNullDate. Regards Stefan ps. OnBeforePopup doesn''t work, check line 2405-2406 in DateTimePickerExt (2.0.2.0). ds.

Administrator [Syncfusion]
Replied On January 16, 2004 12:12 PM

Hi Stefan, Thanks for the information, and for the code snippet above. I have consulted the Essential Suite development team regarding this issue. We will further investigate this and I will keep you posted on the developments. We appreciate your patience, and thanks for your feedback. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On January 19, 2004 08:17 AM

Hi Stefan, All of the above mentioned issues have been taken care of now, and the fixes will be available in the next build of Essential Suite. Please open an incident in DirectTrac in this regard, and I will update you there with further details on these problems and the fixes. We appreciate your cooperation, and thanks for considering Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Simon Storr
Replied On February 16, 2004 07:09 AM

The performance hit for us anyway is due to it throwing up a silent exception for the DateTimePicketExt dtpDate - this.dtpDate = new Syncfusion.Windows.Forms.Tools.DateTimePickerExt(); ((System.ComponentModel.ISupportInitialize)(this.dtpDate)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dtpDate.Calendar)).BeginInit(); this.SuspendLayout(); The line ((System.ComponentModel.ISupportInitialize)(this.dtpDate.Calendar)).BeginInit(); throws up A first chance exception of type ''System.FormatException'' occurred in mscorlib.dll Additional information: Input string was not in a correct format. Commenting out this line throws up the same exception the first time dtpDate.Calendar is referenced, in this case - this.dtpDate.Calendar.AllowSelection = Syncfusion.Windows.Forms.Grid.GridSelectionFlags.None;

Administrator [Syncfusion]
Replied On February 16, 2004 05:11 PM

Hi Simon, Thanks for bringing this to our attention. However we could not observe any exceptions when we tested for this issue using our latest release, v2.0.2.1. Several related fixes/improvements have been performed on the DateTimePickerExt since the release of v1.6.1.8, our last 1.6 build. If you are using an earlier version please create an incident in DirectTrac in this regard, and I will update you with the download instructions for v2.0.2.1. Thanks for coooperation. Regards, Guru Patwal Syncfusion, Inc.

Carl
Replied On April 5, 2004 05:07 AM

I´ve seen a related bug to this problem. When we comment out all the calendar code before popup we get a crash if we press the enter or escape key. This is because you override ProcessCmdKey and check "popupWindow.IsShowing()" even though popupWindow isn´t initialized. We are about to release an application built on ver 1.6.1.8 could we get a patch to fix this problem?

Administrator [Syncfusion]
Replied On April 5, 2004 12:35 PM

Hi Carl, Thanks for opening an incident in DirectTrac in this regard. I will update you there from now on. We appreciate your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;