PBDR.COM

About   -   Contact   -   Purchase   -   Search   -   What's New

 
 
Datawindow Access Speed
When PowerBuilder 5 came out the Datawindow gained a new way to access the attributes of the Datawindow object. Previous to PowerBuilder 5 we had to use the GetItemX commands and Modify and Describe. Most newcomer's to PowerBuilder automatically use the new dot notation and do not think about the old GetItemX functions. Being and old timer I still use the GetItemX functions but recently I wondered if a move to the new dot notation was worth a look. After running a quick test I found out that like jokes the old ones are the best! From the results below you can see that GetItemX was better in PB5 and got worse in PB6 while the dot notation was terrible in PB5 it was greatly improved in PB6 although it still cannot touch the GetItemX. I also tested use of SetRedraw but as I expected it had not bearing on the results.

The test was performed using 1,000 rows with a string, datetime and number as the data values:

Test PB5 Time in milliseconds PB6 Time in milliseconds
GetItemX using the Column Number 205 316
GetItemX using the Column Name 262 371
Dot Notation using the Column Name 851 1881
Dot Notation using Array Subscript 2293 1075
Dot Notation using a DWO reference and Array SubScript 2280 1098
 

Top of Page

Legal Notice

Ken Howe 2011