How much data are you writing to the TLServer each time you open the file?
The process of writing data to the TLServer file itself is actually very fast. However, TCP communication is a two way process. When the PLC sends a TCP packet to the TLServer (i.e. the PC), it waits for an ACK from the PC before sending the next packet. But the PC, being designed to handle large volume of data, does not like to send an ACK when it receive a small packet from the PLC. Instead it thinks that more data should be forthcoming and therefore it will wait for 200ms and only when nothing else is received, it will then send an ACK. In networking lingo this is called a "Delayed ACK". The "Delay ACK" action is a feature designed into the TCP/IP stack of Windows operating system and it is not something that TLServer can override.
The way the PLC handles the PRINT #4 command is that each time a PRINT #4 command is executed it sends a packet to the TLServer. Therefore if you break down your data into multiple PRINT #4 (say using a FOR NEXT loop to send a lot of DM data), the accumulated Delayed ACK adds up and make the whole process appear extremely slow.
So what you can do is to minimize the number of time PRINT #4 is run each time you want to write data to the TLServer. You can use the PRINT #4 <1st data>;<2nd data>;<3rd data> and so on to send most of the data in a single PRINT #4 statement. As long as the total number of bytes is < 128 in a single PRINT #4 command it will be sent out in a single packet.
For example, if you want to store the data of DM[1] to DM[10] to the TLServer in CSV format, instead of running PRINT #4 statements 10 times to print DM[1] to DM[10] each time, you can do the following:
PRINT #4 "<REMOTEFS 192.168.1.169:9080>"
PRINT #4 "<APPEND DataDump.TXT>"
PRINT #4 "DATE: ";DATE[1];"/";DATE[2];"/";DATE[3];",";"TIME:";TIME[1];":";TIME[2];":";TIME[3];",";
PRINT #4 DM[1];",";DM[2];",";DM[3];",";DM[4];",";DM[5];",";
PRINT #4 DM[6];",";DM[7];",";DM[8];",";;DM[9];",";DM[10]
PRINT #4 "</>"
PRINT #4 "</RemoteFS>"
A command such as the above would take < 2 seconds to complete opening a file on TLServer, append the date and time stamp and 10 DM variable data. All data are separated by comma and therefore it is a CSV format that can be easily imported into a spreadsheet or database.