Sending Large Data to the Client (Magic xpa 3.x)
When sending big data to the client, there are four issues that need to be taken care of:
The memory limit depends on individual machines. If the memory limit is surpassed, the Magic xpa Runtime will crash. Therefore, you have to control the memory allocation by setting an appropriate value in the Chunk Size Expression task property - depending on the size of a single record and the memory available for the machine.
Setting the chunk size to 1 will send one record at a time.
Once both the sending and receiving has been taken care of, you might need to set the proper HTTP Timeout so as to provide enough time for communication.
Line Mode forms consume memory by table-size each page-down, while Screen Mode forms consume one line each time. Using Screen mode and navigating to required records by direct-access will help to control memory consumption on the client-side.
In a Rich Client program, if the data view contains BLOB variables with lots of content, the BLOBs will be passed between the server and clients (like all other variables), and this might slow down the program.
It is advised not to define the BLOBs in the data view if they are not used, or you should create a new Batch task that handles them if they are to be used on the server side.
If you need to transfer files between the client and the server (and vice versa), you should use the ServerFileToClient and ClientFileToServer functions instead of using BLOBs. Using BLOBs to transfer files is not efficient and consumes lots of memory as explained above.