Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 18 of 18 total
Thread Help needed to speed things up
Wed, Apr 20 2011 9:58 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John


No, but the recruitment business has been slow this last couple of years so I can do it quick and they may give me some money back Smiley

Roy Lambert
Fri, Apr 22 2011 7:11 AMPermanent Link

John Hay

Roy,

Seems like the LAN caching is better than your HD caching which is weird.

What are these measurements?  If they are milliseconds under 1 second doesn't seem to bad to populate.

If you just set the first 629 rows to selected how long does that take?

John

Sat, Apr 23 2011 3:01 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John

>Seems like the LAN caching is better than your HD caching which is weird.

Well it could be that the "server" (actually an old notebook) is running XP and my notebook is running Vista <vbg>

>What are these measurements?

Ticks (ie GetTickCount)

>If they are milliseconds under 1 second doesn't seem to bad to populate.

Maybe not (it was a lot longer originally) but when its all combined the visual effect is horrible. I've split the code that does this into an after show event to improve things a bit.

>If you just set the first 629 rows to selected how long does that take?

No idea - I'll see.

Roy Lambert
Sat, Apr 23 2011 3:11 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John

>If you just set the first 629 rows to selected how long does that take?

a smidgeon under 300

Roy Lambert
Tue, Apr 26 2011 12:41 PMPermanent Link

John Hay

Roy

> >If you just set the first 629 rows to selected how long does that take?
>
> a smidgeon under 300

And if you just do the next without setting the selection?

John

Wed, Apr 27 2011 3:50 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John


I couldn't do a straight compare so I tested with and without

The code is

t1:=gettickcount;
 while not Companies.Eof do begin
  CompanyList.SelectedRows.CurrentRowSelected := True;
  Companies.Next;
 end;
t2:=gettickcount;
showmessage(inttostr(t2-t1));

As about the timing is 499 ticks

Comment out CompanyList.SelectedRows.CurrentRowSelected := True; and its 461

The code is wrapped in Companies.DisableControls; Companies.EnableControls; but I tried zapping the datasource connection just in case its the visual controls - no real difference.

Then I tried altering the index from the company name to the autoinc which is the primary key. with CompanyList.SelectedRows.CurrentRowSelected := True commented out it drops to 280 ticks.

Further testing will be carried out this evening after work.

Roy Lambert
Wed, Apr 27 2011 7:45 AMPermanent Link

John Hay

Roy

> Then I tried altering the index from the company name to the autoinc which is the primary key. with
CompanyList.SelectedRows.CurrentRowSelected := True commented out it drops to 280 ticks.

Is that for 629 records?  It seems very slow.  Barring some external problem(hardware,antivirus etc) the only thing I
can think of would be lookup fields or before/after scroll events.

John

Wed, Apr 27 2011 1:17 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John

Latest findings are that when I have a form with two instances of the companies table, a couple of buttons and a couple of TMemos to display results I get very little difference regardless of which index is set. I then tried applying the filter that gets used when I open the form and again roughly the same times (this time sub 200 ticks) so I'm back to thinking its some sort of interaction with visual controls but I'm confused as to what it could be.

Back in the real app there's one calculated field - zapped it - no difference. There's a beforpost, afterpost and beforecancel events but that's all and knocking those out made no difference as expected.

Roy Lambert
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image