I did some tests a while back for one of my own apps to see what might happen when a database got big.
This information is Windows only - I never did these tests on the other platforms, but the test code will run unmodified on the others apart from the API calls.
Column wise - there is a limit on the number of columns that the control will support properly. At the time I didn't find any supporting documentation to describe it offically so I don't know what the precise cause is. Somewhere around 300 columns the header stops working properly and stops displaying the later column titles. You can't resize column width properly and the sync on scroll between the header/data area also gets messed up totally. This will limit the number of columns that you can viably create. (I think anyone creating this many columns needs to rethink their design though!)
Column performance seems to be slightly worse than row performance, which didn't really surprise me after the experience above.
That is to say that a control with N rows and M columns will perform slightly better than a control with M rows and N columns where N >> M.
Row wise - The major limiting factor will be response times, with initial load times the slowest. Your users will be complaining about the poor peformance of the application
long before you reach any limits of the control. Performance will alter per the spec of machine and the amount of available RAM.
Code: Select all
#Width = 600
#Height = 400
; Load becomes noticable.
#Rows = 200
#Columns = 10
; Load takes over a minute. You can improve this with SetRedraw.
; #Rows = 100000
; #Columns = 30
; Load takes nearly two minutes.
; #Rows = 100000
; #Columns = 100
; This one works fine.
; #Rows = 400
; #Columns = 2
; This one is broken.
; The last columns won't display in the header. Header/layout will get out of sync on h-scrolling.
; #Rows = 2
; #Columns = 400
Define.S sText
Define.I iCol, iRow, iEvent
If OpenWindow(0, 50, 50, #Width, #Height, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(0, 5, 5, #Width - 10, #Height - 10, "Column 1", 100, #PB_ListIcon_FullRowSelect | #PB_ListIcon_AlwaysShowSelection)
; This will improve load times (a bit).
; SendMessage_(GadgetID(0), #WM_SETREDRAW, #False, 0)
For iCol = 2 To #Columns
AddGadgetColumn(0, iCol, "Column " + StrU(iCol), 100)
Next iCol
For iRow = 1 To #Rows
sText = #Empty$
For iCol = 1 To #Columns
sText + "Item " + StrU(iRow) + "." + StrU(iCol) + Chr(10)
Next iCol
AddGadgetItem(0, -1, sText)
Next iRow
; Need this too if you have the one above uncommented.
; SendMessage_(GadgetID(0), #WM_SETREDRAW, #True, 0)
Repeat
iEvent = WaitWindowEvent()
Until iEvent = #PB_Event_CloseWindow
EndIf