Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Many items, performance lack (Read 12177 times)
SGS Software
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 22
Joined: Jul 28th, 2014
Many items, performance lack
Jan 15th, 2016 at 8:02am
Print Post  
Hi,
unfortunately I have a problem.
The scenario is about 25/30 resources, all the full year and
60 visible days. The software that I am developing is an hotel room
planner so there are so many items to display "per page".
I wrote "per page" because the loading is paginated, when I move
left/right/up/down I load only the visible resources and items.
By the way, I noticed that the permormance is very poor to rebuild the schedule (I used BeginInit and EndInit, but nothing changes) and the mouse interaction become so slow!
The query to pick up the results run in less than a second but the scheduler
takes 2/3 seconds to clear and rebuild...Any advice to speed up?
I populate data asynchronously so the loop to add items is the following:

VB
Code
Select All
Dim _items As New ItemCollection
Dim counter As Integer = 1
For Each row In _dtItems.Rows
	If IsDBNull(row!From) = False Then

		Dim o As New Appointment()
		o.Id = counter
		o.HeaderText = row!Name
		o.StartTime = row!From
		o.EndTime = row!To
		o.Resources.Add(.Schedule.Resources(row!ResourceId))
		o.AllowMove = False

		_items.Add(o)

	End If
	counter = counter + 1
Next

.Schedule.Items.AddRange(_items) 



Thank you.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Many items, performance lack
Reply #1 - Jan 15th, 2016 at 11:01am
Print Post  
Hi,

We will look into it. Are you still using the Resource view? What is the approximate total number of items in the view at one time?

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


I Love MindFusion!

Posts: 22
Joined: Jul 28th, 2014
Re: Many items, performance lack
Reply #2 - Jan 15th, 2016 at 11:23am
Print Post  
Meppy wrote on Jan 15th, 2016 at 11:01am:
Hi,

We will look into it. Are you still using the Resource view? What is the approximate total number of items in the view at one time?

Regards,
Meppy


Yes, It's the ResourceView mode...building the scheduler by firing some buttons. right and left change the HScrollPos value, up and down are used to perform the resources pagination.

I attach a common scenario.

Thank you.
  

common_scenario.png ( 138 KB | 140 Downloads )
common_scenario.png
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Many items, performance lack
Reply #3 - Jan 15th, 2016 at 12:24pm
Print Post  
Do you clear the Schedule.Items collection before adding the new items?
  
Back to top
 
IP Logged
 
SGS Software
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 22
Joined: Jul 28th, 2014
Re: Many items, performance lack
Reply #4 - Jan 15th, 2016 at 2:07pm
Print Post  
Meppy wrote on Jan 15th, 2016 at 12:24pm:
Do you clear the Schedule.Items collection before adding the new items?


Yes, befor starting the data feed loop I run this:

Code
Select All
.Resources.Clear()
.Schedule.Resources.Clear()
.Schedule.Items.Clear()
 



I tested with and without .BeginInit and .EndInit
but the result it's the same
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Many items, performance lack
Reply #5 - Jan 19th, 2016 at 10:17am
Print Post  
Hi,

We made some performance improvements to the Resource view. The new version of the assemblies can be downloaded from the link below:

https://mindfusion.eu/_temp/MindFusion.Scheduling.5.6.2.zip

Please, let me know if there are any problems with this update.

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


I Love MindFusion!

Posts: 22
Joined: Jul 28th, 2014
Re: Many items, performance lack
Reply #6 - Jan 19th, 2016 at 11:35am
Print Post  
Meppy wrote on Jan 19th, 2016 at 10:17am:
Hi,

We made some performance improvements to the Resource view. The new version of the assemblies can be downloaded from the link below:

https://mindfusion.eu/_temp/MindFusion.Scheduling.5.6.2.zip

Please, let me know if there are any problems with this update.

Regards,
Meppy


Thank you. I will test and let you know!
Do you advice me to perform BeginInit and EndInit?
If affermative, should I perform it while deleting or while populating?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Many items, performance lack
Reply #7 - Jan 19th, 2016 at 11:43am
Print Post  
Hi,

Use BeginInit/EndInit when initializing the control with data or when you perform a batch of modifications (e.g. when deleting many items at once). Regardless, the control should be faster when interacting with the items in a grouped view where only some of the resources are visible.

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


I Love MindFusion!

Posts: 22
Joined: Jul 28th, 2014
Re: Many items, performance lack
Reply #8 - Jan 20th, 2016 at 7:49am
Print Post  
Meppy wrote on Jan 19th, 2016 at 11:43am:
Hi,

Use BeginInit/EndInit when initializing the control with data or when you perform a batch of modifications (e.g. when deleting many items at once). Regardless, the control should be faster when interacting with the items in a grouped view where only some of the resources are visible.

Regards,
Meppy


Ok.
Tested, but honestly not so much better than before..
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Many items, performance lack
Reply #9 - Jan 20th, 2016 at 8:24am
Print Post  
Approximately how many items are visible at a time in the view? Also, how do you perform the resource pagination?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Many items, performance lack
Reply #10 - Jan 20th, 2016 at 8:31am
Print Post  
Locally I am running a test with 5000 resources with 100 items each (a total of 500k items) where only 30 resources are visible at a time and the control performs decently.
  
Back to top
 
IP Logged
 
SGS Software
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 22
Joined: Jul 28th, 2014
Re: Many items, performance lack
Reply #11 - Jan 20th, 2016 at 9:09am
Print Post  
Meppy wrote on Jan 20th, 2016 at 8:31am:
Locally I am running a test with 5000 resources with 100 items each (a total of 500k items) where only 30 resources are visible at a time and the control performs decently.


Can you provide me the example?
Maybe I am wrong is something that I can't currently figure out...
Thanks
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Many items, performance lack
Reply #12 - Jan 20th, 2016 at 10:53am
Print Post  
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Many items, performance lack
Reply #13 - Jan 22nd, 2016 at 8:48am
Print Post  
Hi,

We made further improvements to the loading and displaying speed of the schedule. You can download the test application (in C#) and the updated assemblies from the following link:

https://mindfusion.eu/_samples/_sample_AdvancedItemDrawing5.zip

The sample now loads only the visible resources and items for each page. Scrolling up/down clears the schedule completely and reloads the newly appeared resources/items. In addition, the following settings have been changed to improve performance:
  • The shadows have been turned off.
  • The collisions have been turned off (ResourceViewSettings.EnableCollisions). I noticed that none of your items collide so you may as well turn this setting off.

The schedule now takes 0.04s to scroll to a new page.

Let me know if this helps.

Regards,
Meppy

  
Back to top
 
IP Logged
 
SGS Software
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 22
Joined: Jul 28th, 2014
Re: Many items, performance lack
Reply #14 - Jan 25th, 2016 at 7:38am
Print Post  
Meppy wrote on Jan 22nd, 2016 at 8:48am:
Hi,

We made further improvements to the loading and displaying speed of the schedule. You can download the test application (in C#) and the updated assemblies from the following link:

https://mindfusion.eu/_samples/_sample_AdvancedItemDrawing5.zip

The sample now loads only the visible resources and items for each page. Scrolling up/down clears the schedule completely and reloads the newly appeared resources/items. In addition, the following settings have been changed to improve performance:
  • The shadows have been turned off.
  • The collisions have been turned off (ResourceViewSettings.EnableCollisions). I noticed that none of your items collide so you may as well turn this setting off.

The schedule now takes 0.04s to scroll to a new page.

Let me know if this helps.

Regards,
Meppy



Hi, it works better!
As I can see "Locations" were used instead of "Resources".
Is there a specific reason for this?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint