Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Vertical Smooth Scrolling Performance
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Vertical Smooth Scrolling Performance

 Post Reply Post Reply
Author
Message
fjosesen View Drop Down
Groupie
Groupie
Avatar

Joined: 30 June 2008
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote fjosesen Quote  Post ReplyReply Direct Link To This Post Topic: Vertical Smooth Scrolling Performance
    Posted: 23 August 2011 at 1:56pm
Hi,
    I've been testing the new vertical smooth scrolling, and it seems to work fine (in 15.1.3) LOL. Sometimes it makes an small jump in the opposite direction when you are scrolling pushing the up/down scrollbar button, but is not very important.
 
    The big problem comes with the performance. When you switch to vertical smooth scrolling mode, the performance is heavily decreased. I've been monitoring the control events and realized that the BeforeDrawRaw event is fired multiple times when you only scroll one line (one for every record multiplied for every column). For example, if I'm viewing only the item #1700 (which is taller than the control) with its preview area and I click on the scroll down button, the event is fired about 1700 * 8 columns times (~13,600 times). This causes the performance to decrease, because in every event handle, if you perform a minimal operation (for example, one search in a map, due to the virtual mode) the response time is not acceptable.
 
    I think there are two ways to solve this problem:
 
    1- Is there any way to know if a record is shown? I've tried the "visible" property of the record and the row one but both treat about the visibility not just if they are being shown/drawn. If there'd be any way, I can ignore the calls to BeforeDrawRaw handler.
 
    2- Perhaps you can avoid to fire this event with hidden rows. In my opinion, it has no sense to fire a BeforeDrawRaw event when you are not going to draw the row, hasn't it?
 
    Any recomendation?
 
    Kind regards,
 
F.José Sen
Products: Suite Pro (ActiveX) v18.0.1
          Toolkit Pro (MFC) v18.0.1
Platform: Windows 10 (64bit)
Language: VC++ 2013 (MFC)
Back to Top
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2011 at 5:55am
I've noticed similar. I have also noticed that there are major problems in Terminalservice envoroments like Microsoft Remote Desktop Service or Citrix XenApp. I would therefore have a very strong plea to Andre. Is it possible to introduce a property that turns off this feature entirely? I would be very grateful for it, in any case!
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2011 at 1:57pm
Originally posted by McKloony McKloony wrote:

I would therefore have a very strong plea to Andre. Is it possible to introduce a property that turns off this feature entirely? I would be very grateful for it, in any case!


Hi,

by default you have block scrolling like in preview versions. So I'm not sure what you'd like to turn off.

Andre

Codejock support
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2011 at 2:02pm
Originally posted by fjosesen fjosesen wrote:

 
Perhaps you can avoid to fire this event with hidden rows. In my opinion, it has no sense to fire a BeforeDrawRaw event when you are not going to draw the row, hasn't it?

Hi,

for smooth scrolling the height of each row need to be measured. Otherwise it's not possible to determine the row at the current scroll offset. Smooth scrolling may not be suitable in all situations (large recordsets etc.).

Andre

Codejock support
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2011 at 2:04pm
Couldn't MeasureRow just fire then, and not BeforeDrawRow?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2011 at 2:06pm
Originally posted by jpbro jpbro wrote:

Couldn't MeasureRow just fire then, and not BeforeDrawRow?


I'll look into all events that will be fired and see if it can be improved.

Andre

Codejock support
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2011 at 2:36pm
Thanks a lot Andre, I appreciate the work you are doing with the ReportControl.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2011 at 1:58am
from release 15.0.1 to 15.1.1 something fundamental has changed to the scrolling functions in ReportControl. Also blockmode has not the same scrolling performence than bevore. Again, in terminalservice envoroments,  scrolling (only) by the MouseWheel, "swallows" to much draw events. You have to turn the wheel three times as often as before to obtain the same result.
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6
Back to Top
fjosesen View Drop Down
Groupie
Groupie
Avatar

Joined: 30 June 2008
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote fjosesen Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2011 at 3:02am
Originally posted by jpbro jpbro wrote:

Couldn't MeasureRow just fire then, and not BeforeDrawRow?
 
    Exactly. Perhaps you could fire only the MeasureRow and the MeasurePreviewItem events if you just need to calculate the heights of the rows.
 
    Meanwhile, is there any way to know (inside the BeforeDrawRow event handler) if the row is going to be drawn or if it is called just to perform the measurement of the row? I've been playing with "TopRowIndex" control property but it always returns 0 (inside BeforeDrawRow handler). This could help to determine if the row will be drawn or not (to avoid data searches, etc.).
 
    Thanks in advance,
 
F.José Sen
Products: Suite Pro (ActiveX) v18.0.1
          Toolkit Pro (MFC) v18.0.1
Platform: Windows 10 (64bit)
Language: VC++ 2013 (MFC)
Back to Top
fjosesen View Drop Down
Groupie
Groupie
Avatar

Joined: 30 June 2008
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote fjosesen Quote  Post ReplyReply Direct Link To This Post Posted: 30 August 2011 at 8:14am
Hi,
    Can you say me anything about this? It would be enought for me now just to know if the row is going to be really drawn during the BeforeDrawRow event handler or not (just called to meaure it).
 
    Kind regards,
 
F.José Sen
Products: Suite Pro (ActiveX) v18.0.1
          Toolkit Pro (MFC) v18.0.1
Platform: Windows 10 (64bit)
Language: VC++ 2013 (MFC)
Back to Top
fjosesen View Drop Down
Groupie
Groupie
Avatar

Joined: 30 June 2008
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote fjosesen Quote  Post ReplyReply Direct Link To This Post Posted: 08 September 2011 at 7:42am
Hi,
 
    Also, I would like to know if someone from Codejock Support Team will answer to this topic any time.
 
    Kind regards,
 
F.José Sen
Products: Suite Pro (ActiveX) v18.0.1
          Toolkit Pro (MFC) v18.0.1
Platform: Windows 10 (64bit)
Language: VC++ 2013 (MFC)
Back to Top
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post Posted: 08 September 2011 at 8:53am
I would suggest, send the problem description to support directly. Maybe you'll get a yes answer. The posts in this forum are indeed voluntary.
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 15 September 2011 at 10:38pm
Originally posted by jpbro jpbro wrote:

Couldn't MeasureRow just fire then, and not BeforeDrawRow?


Hi,

I've looked into this today and the call to BeforeDrawRow is correct, because the item metrics need to be queried. Otherwise the row height can not be calculated.

Andre

Codejock support
Back to Top
fjosesen View Drop Down
Groupie
Groupie
Avatar

Joined: 30 June 2008
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote fjosesen Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2011 at 12:41pm

Hi Andre,

    Why not just fire the MeasureRow and the MeasurePreviewItem events if you only need to measure the rows? I cannot understand why you need to fire the BeforeDrawRaw event to measure the height of the rows if the user won't return any information about that (the height of the row).
 
    On the other hand, if you need to fire it also for measuring the rows, could you include any parameter (or another resource, like a property we can read) to inform us that the event is being fired just for measuring purposes? Think that this event (BeforeDrawRow) is often used to perform some heavy operations (searching data to draw text, etc.) that we can ignore if we could know that the row won't really be drawn after the event. This is the main reason, at least for me, why the performance is bad :-)
 
    Kind regards,
 
F.José Sen
Products: Suite Pro (ActiveX) v18.0.1
          Toolkit Pro (MFC) v18.0.1
Platform: Windows 10 (64bit)
Language: VC++ 2013 (MFC)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.