> The fastest way to build the output is probably with a pre-sized blob, and > using TEXT TO BLOB with the offset parameter. Pushing elements into a > collection and then using collection.join() is also pretty fast, but again > you’d have to test to see how large a text variable can actually be, and > whether the limit was large enough both interpreted and compiled. If you > don’t have enough RAM for a 1GB blob, smaller blobs may work with SEND PACKET.
I ran some speed tests using 4D v18 on Windows 10. The results were interesting… in times past it was much faster to run a report using an internal buffer of some sort such as a text or blob variable. My resent tests showed it was faster to use SEND PACKET without buffering anything. Again I was testing with 4D v18 and results may vary. I’m assuming you are using unicode on your app? I think you can still do that, but I’m not sure. If you are not in unicode you should switch. With unicode on a text can be very large. For imports I just use Document to Text. When exporting, large text vars can slow down as the resizing of them becomes slow. You could try filling a blob, but like I said SEND PACKT seemed to me to be the fastest option. As was mentioned be sure to build your document local in the temp folder then move it to its home on the network. Writing across the network to create a file is slow and prone to error. Neil -- ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************