Fairly new to Coldfusion. Running CF2021 on Windows Server 2016 Datacenter 3 cores/12GB RAM. Running SQL server 2012 (Server 2012 R2; 3 cores/12GB RAM). These are virtual servers as well. Using FW/1; MVC.
I have my code written to download a large set of data (165,000 rows with 34 columns/headers).
In my code, I have the following line started
theFile=GetDirectoryFromPath(getCurrentTemplatePath()) & "newSpreadsheet.xlsx";
which means it is saving to my "views" folder on my server (no big deal). Then I am using spreadsheetAddColumn(.....)
to add my headers and spreadsheetAddRows(theSheet,#rc.myquery#);
to pull my query from my model view. My problem is, there is so much data that it is pulling down, the page is erroring out with a timeout error. I limited my download to 25k records and it takes about 14 minutes to pull this set of data. I need to figure out how to get all of the records in ONE spreadsheet and what I would like to do is run a scheduledtask in order to run this during down periods and have it readily available to download the spreadsheet when folks start working. Any ideas how to speed this up and/or not have the site time out?
Another problem I am having is my scheduled tasks aren't running due to our server being secured by Siteminder. It requires a user log in upon visiting the site, even though I have anonymous authentication enabled. So my shceduled task will run, but I am getting a 403 error. I have looked into doing this via my code, but have been unsuccessful. So if anyone has any ideas on this as well, I would appreciate any suggestions.
We've experienced both memory and performance issues with the built-in CFSpreadsheet functions over various versions of ACF. If you want to experiment, try the alternative solution - the spreadsheet-cfml library. It uses the latest POI Java libraries and supports the new XML spreadsheet workbook object (which uses the memory-efficient SXSSF streaming format while being populated). It also supports 60+ functions that aren't available in ColdFusion.
https://github.com/cfsimplicity/spreadsheet-cfml