Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Calendar thread priority at highest (Read 3182 times)
microsec_ash
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Mar 23rd, 2010
Calendar thread priority at highest
Mar 23rd, 2010 at 4:50pm
Print Post  
I have taken over some code, so I am new to the Planner.NET library.

I have an issue where the instantiated Calendar control (MindFusion.Scheduling.WinForms.Calendar) results in a thread being created with the Highest thread priority. This is subsequently causing massive performance issues (unresponsive, not refreshing correctly) because the thread is hogging processor time.

The thread is created when the object is instantiated in my form's InitializeComponent() method:

Me.m_CalMain = New MindFusion.Scheduling.WinForms.Calendar
' above call resulted in thread created that is running with Highest priority

CType(Me.m_CalMain, System.ComponentModel.ISupportInitialize).BeginInit()

'
'm_CalMain
'
Me.m_CalMain.AllowInplaceEdit = False
Me.m_CalMain.CurrentView = MindFusion.Scheduling.WinForms.CalendarView.WeekRange
Me.m_CalMain.Date = New Date(2006, 11, 1, 0, 0, 0, 0)
Me.m_CalMain.DateTimeFormat = CType(resources.GetObject("m_CalMain.DateTimeFormat"), System.Globalization.DateTimeFormatInfo)
Me.m_CalMain.Dock = System.Windows.Forms.DockStyle.Fill
Me.m_CalMain.EndDate = New Date(2006, 12, 1, 0, 0, 0, 0)
Me.m_CalMain.ItemSettings.ShowMoreItemsCue = MindFusion.Scheduling.WinForms.State.Disabled
Me.m_CalMain.Location = New System.Drawing.Point(0, 0)
Me.m_CalMain.Name = "m_CalMain"
Me.m_CalMain.Size = New System.Drawing.Size(624, 529)
Me.m_CalMain.TabIndex = 1
Me.m_CalMain.Theme = MindFusion.Scheduling.WinForms.ThemeType.Windows2003
Me.m_CalMain.WeekRangeSettings.DaySettings.Style = CType(resources.GetObject("m_CalMain.WeekRangeSettings.DaySettings.Style"), MindFusion.Scheduling.Style)
Me.m_CalMain.WeekRangeSettings.GroupWeekends = MindFusion.Scheduling.WinForms.State.Disabled
Me.m_CalMain.WeekRangeSettings.HeaderStyle = MindFusion.Scheduling.WinForms.WeekRangeHeaderStyle.Title
Me.m_CalMain.WeekRangeSettings.Style = CType(resources.GetObject("m_CalMain.WeekRangeSettings.Style"), MindFusion.Scheduling.Style)
Me.m_CalMain.WeekRangeSettings.TimePeriodHeaderHeight = 32
Me.m_CalMain.WeekRangeSettings.TitleFormat = "MMM yyyy"
Me.m_CalMain.WeekRangeSettings.TitleSeparator = " to "
Me.m_CalMain.WeekRangeSettings.VisibleRows = 6

CType(Me.m_CalMain, System.ComponentModel.ISupportInitialize).EndInit()


Should this thread be running with this priority?  What can I do to lower this thread's priority back to Normal so that the application runs, responds and refreshes corrrectly?

Many thanks.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Calendar thread priority at highest
Reply #1 - Mar 24th, 2010 at 8:25am
Print Post  
The control does not explicitly create any new threads. I am running several tests here with applications containing the Calendar control and the only thread with 'Highest' priority appears to be mscorwks.dll!StrongNameFreeBuffer, which appears to be part of the .NET CLR.

Regards,
Meppy
  
Back to top
 
IP Logged
 
microsec_ash
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Mar 23rd, 2010
Re: Calendar thread priority at highest
Reply #2 - Mar 24th, 2010 at 8:57am
Print Post  
If the Calendar control's constructor is not creating the thread, what is the constructor doing that is resulting in a thread being created?  Because the thread is definately being created by something in response to what is happening in the Calendar control's constructor.  I've proved this by debugging my application and checking the threads list before and after stepping over the Calendar's instantiation.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Calendar thread priority at highest
Reply #3 - Mar 24th, 2010 at 9:54am
Print Post  
You can download a free utility program from the following link:

http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

You can use this program to track the threads of an application and see which module is responsible for creating a particular thread. You can see the threads associated with a process by right-clicking on the process and selecting Properties in the context menu. Let me know of the results.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint