Skip to content

certain code causes onMount() to have hidden slow execution #254

Description

@Adrian-Sanchez

I first noticed it with a cfhttp() in the onMount(). But i have to say, this took me a lot of time to figure out because when I found out the thing you use to troubleshoot, also is the problem..SMH, it was brutal.

Symptom: Certain code will cause cbwire to take 2-3 seconds longer. What's more interesting is that it's not always. You can have an offending piece of code run seamingly fine but wait about 40 seconds with no requests to the server, then run the full lifecycle and it will hang. Wait another 40 seconds, it will do it again. But back to back full lifecycle requests will run promptly with no hanging.

I'm sure Lucee is partially at fault. I'm not entirely sure if it's a cbwire issue. BoxLang doesn't have this issue.

Test case:

`function onMount() {
var startTime = getTickCount();
//writeDump(var="onMount called",format="html");//triggers the issue
//writeOutput("onMount called
");//doesn't trigger the issue
writeOutput(serializeJson(callstackget()) & "
");//triggers the issue
var executionTime = getTickCount() - startTime;
data.executiontimes.push("onMount executed in " & executionTime & "ms");
//runCfhttp()//triggers the issue
}

I've also pushed a test case to a repo
https://github.com/Adrian-Sanchez/cfhttp-bug-cbwire.git

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions