AdobeStock_455007340

More Efficient File Writes

Home » More Efficient File Writes

If you find yourself having to write large amounts of data to a text file using or then you should consider reducing the number of calls you make. File writes are slow operations (and should be locked to prevent concurrent writes to the same file, which could make them even slower). To improve performance manipulate the data in memory – create a variable and keep adding the content to it. When you are done, write it out with a single call. (Applies to: ColdFusion 3 (or later))

Leave a Reply