Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8997585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:54:33+00:00 2026-06-15T23:54:33+00:00

I’ve got some long and complex code that does a bit of parsing, and

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:54:34+00:00Added an answer on June 15, 2026 at 11:54 pm

    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

    <!--- Set the current time out to be 3 seconds. --->
    <cfsetting requesttimeout="3" />
    
    <!---
        Get the millisecond start time for page processing
        (so that later on, we can check to see how long
        the page ran overall).
    --->
    <cfset intStart = GetTickCount() />
    
    
    <!--- Try to kill some time. --->
    <cftry>
    
        <!---
            Here, we are killing time - 4 seconds to be
            approximate. This will exceed the request time
            out set above (3 seconds) and will throw an error.
        --->
        <cfset KillTime( 4000 ) />
    
    
        <!--- The KillTime() method call has timed out. --->
        <cfcatch>
    
            First Timeout!<br />
    
            <!---
                In an attempt to "recover" from this time out,
                update the request time out to be six seconds.
            --->
            <cfsetting requesttimeout="6" />
    
    
            <!--- Try to kill some more time. --->
            <cftry>
    
                <!---
                    We are going to try and kill about four
                    seconds. If this is in terms of the six-second
                    timeout set above, this should NOT timeout.
                    However, if this is in the context of the
                    overall page time (including previous kill time
                    calls), then this will timeout.
                --->
                <cfset KillTime( 4000 ) />
    
    
                <!--- The KillTime() method has timed out. --->
                <cfcatch>
    
                    Second Timeout!<br />
    
                </cfcatch>
            </cftry>
    
        </cfcatch>
    
    </cftry>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I've got a string that has curly quotes in it. I'd like to replace
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.