I’ve got some long and complex code that does a bit of parsing, and takes a while to go through, it doesn’t make much sense in this case to optimize the code.
What are the strategies for handling long execution times and letting the user know when it is done?
explanation of why it doesn’t make much sense to optimize
The application has end-user-facing pages and non-end-user-facing pages. In the non-user facing area I am parsing several excel spreadsheets. Loading and looping through these takes a long time. It I optimize the code to run within my timeout limit it might work today, but a month from now I might be importing a file that’s 4 times as long and it won’t work yet again. The issue I am trying to solve is getting around the cf timeout for a specific operation that I know takes a long time.
I’ve tried using threads but for some reason worked on CF9 but not CF8 (though they are supported)
I also just found out about cfsetting requestTimeOut which might be able to do what I need to do.
For anyone else looking to extend the timeout, Ben Nadel has a good post about ‘cfsetting requestTimeOut’
http://www.bennadel.com/blog/626-CFSetting-RequestTimeout-Updates-Timeouts-It-Does-Not-Set-Them.htm
this doesn’t solve the issue of notifying, but it will render the page once it is done, so it solves my problem
example code that sets multiple timeout levels