Mike Copeland wrote on 2011-03-02:
<snip>
> Oh, here's the code from the INIT event on the form (I've tried various
> other events, and even put it in the click event of a button on the
> form, no change) Also, you'll notice there's no indication of how I'm
> getting the data from MySQL. The sample below has the same speed issues
> described above, but as you can see the retrieval from the MySQL server
> is not involved in the timing and is actually very fast in all
> scenarios. ----------------------------------------------------------
>
> MESSAGEBOX('Starting to load Grid. Click OK to
> start...',0+64,'Notice') LOCAL ttimestart,ttimeexp SELECT sku FROM
> skus into temp WHERE active=1 order by sku SELECT temp GO TOP IN temp
>
> ttimestart=seconds()
>
> SCAN WHILE !EOF('temp')
> thisform.ctGrid.addcomboitem(1,temp.sku)
> ENDSCAN
>
> ttimeexp=seconds()-ttimestart
> MESSAGEBOX('Finished.'+CHR(13)+ALLTRIM(STR(RECCOUNT('temp')))+' items
> added.'+;
> CHR(13)+'Time elapsed:
'+ALLTRIM(STR(ttimeexp,6,2))+' seconds',0+64,'Notice')
---------------------------------------------------------------------- -
Mike,
Move the code to a new method on the form. Then call it from the
ctGrid.FirstDraw event.
See if turning off the fancy Windows 7 graphical themes with SYS(2700,0).
Tracy Pearson
PowerChurch Software
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/000001cbd9b1$23333b70$6999b250$@com
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.