Print Page | Close Window

CXTPReportControl Scrolling Very Slow

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=5985
Printed Date: 14 May 2024 at 6:12am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPReportControl Scrolling Very Slow
Posted By: danpetitt
Subject: CXTPReportControl Scrolling Very Slow
Date Posted: 04 January 2007 at 11:46am
As anyone noticed the report control scrolling being incredibly slow?
 
I have a user using my product and they scroll a report control with only 20/30 records and it is visibly a half-second beyond in its dragging ... even when using the mouse wheel. Totally unusable. Wherease 3 others (including me) its instant.
 
However, I tried the ReportSample and modified to call the "AddSampleRecords" function multiple times (12), and now that is really really slow even on my machine (its not got thousands of items).
 
It doesnt make any difference if i turn off grouping, or remove the virtual GetItemMetrics function so I dont know why it is slow.
 
The Grep sample works fine with 10,000 items in it (searching for "the" on my D drive).
 
I am confused, where should I look? Its not my code as your sample exhibit the slowdown?
 
Heres part of a profile I ran from VS6:
    4159.630  74.3     4767.940  85.2       86 CWinThread::PumpMessage(void) (mfc42.dll)
     668.083  11.9      751.746  13.4    49690 CWnd::DefWindowProcA(unsigned int,unsigned int,long) (mfc42.dll)
      88.460   1.6      391.298   7.0    49769 CWnd::OnWndMsg(unsigned int,unsigned int,long,long *) (mfc42.dll)
      82.910   1.5      148.789   2.7    49220 CWnd::OnNotify(unsigned int,long,long *) (mfc42.dll)
      81.936   1.5      183.970   3.3     3328 CXTPReportRecordItem::Draw(struct XTP_REPORTRECORDITEM_DRAWARGS *) (toolkitpro1031vc60.dll)
      57.582   1.0       57.582   1.0     3328 CXTPReportRecordItem::OnDrawCaption(struct XTP_REPORTRECORDITEM_DRAWARGS *,struct XTP_REPORTRECORDITEM_METRICS *) (toolkitpro1031vc60.dll)
      41.668   0.7       41.668   0.7     6147 CXTPReportRecordItemNumber::GetCaption(class CXTPReportColumn *) (toolkitpro1031vc60.dll)
      41.040   0.7       68.128   1.2    50213 CView::OnCmdMsg(unsigned int,int,void *,struct AFX_CMDHANDLERINFO *) (mfc42.dll)
      31.412   0.6      263.804   4.7        1 CReportSampleApp::InitInstance(void) (reportsample.obj)
      20.652   0.4     1059.154  18.9    49769 CWnd::WindowProc(unsigned int,unsigned int,long) (mfc42.dll)
      18.241   0.3       18.247   0.3        2 CFrameWnd::FloatControlBar(class CControlBar *,class CPoint,unsigned long) (mfc42.dll)
      17.854   0.3       22.254   0.4       96 CWinApp::OnIdle(long) (mfc42.dll)
      16.821   0.3      140.449   2.5        1 CMainFrame::OnCreate(struct tagCREATESTRUCTA *) (mainfrm.obj)
      16.022   0.3       18.850   0.3    49965 CDocument::OnCmdMsg(unsigned int,int,void *,struct AFX_CMDHANDLERINFO *) (mfc42.dll)
      15.259   0.3       15.259   0.3     6147 CXTPReportRecordItemDateTime::GetCaption(class CXTPReportColumn *) (toolkitpro1031vc60.dll)
      13.694   0.2       13.694   0.2        1 CReportSampleView::CReportSampleView(void) (reportsampleview.obj)
      13.439   0.2      153.976   2.8        1 CFrameWnd::LoadFrame(unsigned int,unsigned long,class CWnd *,struct CCreateContext *) (mfc42.dll)
      12.062   0.2     5561.136  99.4        1 AfxWinMain(struct HINSTANCE__ *,struct HINSTANCE__ *,char *,int) (mfc42.dll)
      11.802   0.2       11.802   0.2    49176 CXTPReportRecord::GetItemMetrics(struct XTP_REPORTRECORDITEM_DRAWARGS *,struct XTP_REPORTRECORDITEM_METRICS *) (toolkitpro1031vc60.dll)
      10.164   0.2       10.164   0.2    45848 CXTPReportRecordItem::GetCaptionRect(struct XTP_REPORTRECORDITEM_ARGS *,class CRect &) (toolkitpro1031vc60.dll)
       9.364   0.2       21.139   0.4        1 CReportSampleView::OnCreate(struct tagCREATESTRUCTA *) (reportsampleview.obj)
       9.112   0.2       40.055   0.7        6 CFrameWnd::RecalcLayout(int) (mfc42.dll)
       8.623   0.2       18.321   0.3        1 CReportSampleView::~CReportSampleView(void) (reportsampleview.obj)
       8.588   0.2        8.588   0.2    24588 CXTPReportRecordItem::GetCaption(class CXTPReportColumn *) (toolkitpro1031vc60.dll)
       8.410   0.2        8.516   0.2      416 CXTPReportRecordItem::DrawCheckBox(struct XTP_REPORTRECORDITEM_DRAWARGS *,class CRect &) (toolkitpro1031vc60.dll)
       6.618   0.1       23.220   0.4        2 CDialogBar::Create(class CWnd *,char const *,unsigned int,unsigned int) (mfc42.dll)
       6.544   0.1        6.544   0.1    20738 CXTPReportRecordItemText::GetCaption(class CXTPReportColumn *) (toolkitpro1031vc60.dll)
       6.311   0.1        6.311   0.1        1 _$E772 (stdafx.obj)
       6.005   0.1       12.485   0.2        1 CFrameWnd::ActivateFrame(int) (mfc42.dll)
       5.953   0.1        5.953   0.1    50347 CReportSampleView::GetMessageMap(void) (reportsampleview.obj)
       5.754   0.1      185.220   3.3        1 CWinApp::OnFileNew(void) (mfc42.dll)
       5.577   0.1        5.577   0.1        1 CRuntimeClass::CreateObject(void) (mfc42.dll)
       5.016   0.1        5.016   0.1    49176 CXTPReportRecordItem::GetItemMetrics(struct XTP_REPORTRECORDITEM_DRAWARGS *,struct XTP_REPORTRECORDITEM_METRICS *) (toolkitpro1031vc60.dll)
       4.728   0.1       24.398   0.4        1 CWnd::DestroyWindow(void) (mfc42.dll)
       4.526   0.1        4.640   0.1        1 CReportSampleView::OnInitialUpdate(void) (reportsampleview.obj)
       3.479   0.1        3.479   0.1        1 AfxOleInit(void) (mfc42.dll)
       2.918   0.1     5285.268  94.5        1 CWinApp::Run(void) (mfc42.dll)



Replies:
Posted By: sserge
Date Posted: 04 January 2007 at 3:18pm
Hi,

I can only imagine such effect if you're building sample with the toolkit in Profile/Debug mode, or with profiling of some tool like BoundsChecker. Otherwise, it should be working fine.

Any more details on changes in sources? Other details?

--
WBR,
Serge


Posted By: danpetitt
Date Posted: 04 January 2007 at 4:24pm
Its your standard 2006 Q2 sample source with the only change being me duplicating the "AddSampleRecords" function 12 times.
 
Its slow in debug and release ... i only added profiling afterwards to see where the slow down might be and for the purpose of this post.


Posted By: sserge
Date Posted: 04 January 2007 at 6:31pm
Is a Preview mode enabled?


Posted By: danpetitt
Date Posted: 05 January 2007 at 2:07am

Yes, preview is enabled



Posted By: danpetitt
Date Posted: 05 January 2007 at 6:27am
Actually its slower with Preview disabled. Its real jerky. It seems to be less jerky the more columns I remove or whether its the type (num/date) of column thats causing the problem I am not sure


Posted By: sserge
Date Posted: 05 January 2007 at 4:56pm
Please let us also know your OS, screen settings (color depth) and processor speed

--
WBR,
Serge


Posted By: danpetitt
Date Posted: 05 January 2007 at 7:43pm
Win XP Pro SP2, 1600x1200 32bit, dual xeon 3.20ghz, 2gb ram (dell)


Posted By: sserge
Date Posted: 14 January 2007 at 2:52pm
Well, this doesn't actually help to identify a problem 

Could you please attach there a sample solution with your modifications implemented? This could probably help further...

--
WBR,
Serge


Posted By: danpetitt
Date Posted: 15 January 2007 at 12:59pm
As above, I just opened your ReportSample project and modified it to call the "AddSampleRecords" function multiple times (12).

That was all I did, and the view became quite slow.


Posted By: mgampi
Date Posted: 08 February 2007 at 4:18pm
Hi Dan,
 
have you got any response until your last post on this issue? Did you find a solution meanwhile?
 
 


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: danpetitt
Date Posted: 09 February 2007 at 2:38pm
No and no. Still waiting really ... why do you have a speed issue as well?


Posted By: sserge
Date Posted: 09 February 2007 at 3:12pm
Guys,

Sorry, but we simply can't reproduce this issue. It work pretty fine being added 12 and 12*12 times....

I still suspect that the problem is somewhere in your environment details. Locale, or screen resolution, or Service Pack not installed.

Can you find something specific in your settings, what differs from regular WinXP SP2 English (US) ?

--
WBR,
Serge


Posted By: danpetitt
Date Posted: 10 February 2007 at 3:17pm
Nothing unusual with my system, standard WinXP Pro SP2. And on two other standard development machines with the same/similar configuration.

One machine is totally unusable and you cant scroll up/down without it lagging behind about 1/2 seconds, mine just slows down a bit.


Posted By: znakeeye
Date Posted: 12 February 2007 at 4:41pm
I know that tools using hooks, such as Spy++, can crash the SkinFramework completely. Maybe you have advanced hooks installed? Perhaps it could be a good idea to list which AntiVirus you are using. No debugger in memory?
 
Just an idea...


Posted By: sserge
Date Posted: 13 February 2007 at 3:55pm
Yep, that's the good point.

Also, I've spent again spent a few hours trying to reproduce this problem.

On workstations with all available for me configurations it works fast enough.

Please run on the debugger and check the trace log for any exceptions.
For example, what I saw a few years ago, COleDateTime::Format() sometimes (very seldom) throw exeptions on none English locales (or localized OS) (in my case it was French).
 
May be on your machine there is also reproduced some unusual behavior which works fine on other configurations.
 
Try to download latest version sample (10.4.2) and run on your "problem" machine.
Does it works with the same performance as yours?

Do you have some better profiler than VC Profiler, like DevPartner? Could you run the sample under that profiler and see where is a problem?
 
Also try to send a screenshot there.

--
WBR,
Serge



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net