Purpose Trace the grid loading This trace is primarily intended for optimizing puposes by Synactive, but it may also help with the development of GuiXT applications. In particular, you can see how often internal grid data is reloaded, which can perhaps be reduced by using a grid layout with fewer columns. Solution You can activate the trace for one of the following guinet functions: - CallVBAsync guinet.gridcontrol.gridToTable - CallVBAsync guinet.gridcontrol.copyText - CallVBAsync guinet.gridcontrol.loadAllRows In the corresponding call, e.g. CallVBasync rowcount = guinet.gridControl.GridToTable ... add the option tracetext:=, specifying the name of a GuiXT long text variable (arbitrary) into which the trace is to be placed, e.g. "gridtrace": CallVBasync rowcount = guinet.gridControl.GridToTable ... tracetext:="gridtrace" In the following screen statement, you can then display the trace with Message "&text[gridtrace]" As the trace output is quite extensive with many grid lines, it is often better to copy the trace with CopyText fromText="gridtrace" toFile="F:\temp\gridtrace.txt" to a local file and then display it. Alternative: Leave the InputScript unchanged and check the content of the long text you have specified in the GuiXT debugger after the process, e.g. text[gridtrace], In the debugger window the "..." button to the right of the value is useful for displaying the content. |
The parameters specified in the function call are displayed at the start of the trace: Notes on performance optimization In this example, a reload is required after approximately each 30 rows, which is due to the fact that the grid contains a large number of columns. If you specify a layout in the InputScript that only contains the three required columns (order number, order type and short text), the first reload only takes place after approximately each 160 lines. In the InputScript specify the layout name before you start the data selection: Set F[Layout] "/TEST3"Enter "/8" Here "/TEST3" is a specially created cross-user layout with exactly the three required columns. Trace output in this case: Load row no. 162Load row no. 163 Load row no. 164 Returned row ids: 0000000164, Load new grid data starting in row 164 ...elapsed time 15ms Load row no. 165 Load row no. 166 The first reload occurs for row 164 instead of row 28. The loading times per block are now also considerably shorter, as SAP GUI has fewer column values to fill. In our example (IW38, approximately 8000 rows) we measured the following total times: Layout with all columns: 67secLayout containing only order number, order type and short text: 7sec (SAP GUI 8.00 PL6, GuiXT 2024 Q1 1) |
Components |