Skip navigation
Matt Usher
Currently Being Moderated

CF10 debugging slow performance

Jul 5, 2012 12:30 PM

Tags: #debugging #cf10

I'm working on a CF7 to CF10 migration. If I turn on debugging in CF10 I'm seeing high page rendering times of the order of 100 seconds per page. This didn't happen in CF7. The CPU goes to 100% for the duration of the request. It seems the debug rendering is the culprit.

 

I've traced a correlation with custom tag mappings. If I remove the mappings, the page render times become acceptable. The behaviour is the same whether the application calls custom tags or not.

 

What's causing the slow page loads here and is there a work around?

 
Replies
  • Currently Being Moderated
    Jul 6, 2012 6:03 AM   in reply to Matt Usher

    Good analysis.  Just one question: when you say it's got something to do with debug rendering, do you mean that if you have debug rendering on, it'll take (for example) that 147sec to render a page, but with debug off the page renders at an acceptable speed?

     

    Question: are you sure it's the debug rendering, or simply the debug processing?  If you replace the debug output template (in WEB-INF/debug) with an empty file, do you still get the poor performance?  I suspect it's the capturingof the debug info that is the culprit here, not the rendering of the results.

     

    And I'm not sure what to suggest to mitigate it, sorry.  But I am scratching my head...

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 9, 2012 8:36 AM   in reply to Matt Usher

    What about in a pared-back repro case, wherein you're just hitting a single single file, or a file which does an include or calls a CFC method or something?

     

    I'm just trying to work out whether it's a vagary fo what it's outputting for your situation, or just in general.


    Also, are you using the flat view or the tree field for the execution times?

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 9, 2012 10:40 AM   in reply to Matt Usher

    If I remove the custom tag paths...

     

     

    Are these ones set in CFAdmin or in Application.cfc?

     

    And how many mappings are there, and how many files / directories are in the directory structure you're pointing to?  Is it the same with ANY custom tag mappings, or is it just specific ones?  Like for example if you have a single mapping to C:\someEmptyDir, is the problem the same?

     

    I'm just needing to reinstall CF10 to troubleshoot another problem, but it's almost done so will have a look at this shortly and see if I can replicate.

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 9, 2012 11:34 AM   in reply to Adam Cameron.

    OK, I've tracked it down.

     

    It seems expandPath() is REALLY REALLY REALLY slow if you have custom tag paths set that have a lot of files in them.

     

    I added my scratch dir to my custom tag path (6000 files, 2000 dirs), and this caused expandPath() to take about 1.5sec per path to execute (and it's called for every template having its debug output displayed, so that could be really a lot of hits to it.  One might think that's a horrendous sized dir to have in a custom tag path, but the thing is, running the same code with the same config on CF9 causes no discernable delay at all.

     

    So I think, Matt, you've found a serious bug in CF10 there.  This isn't just going to impact debugging, it's going to impact any code using expandPath() in conjunction with custom tag paths (not an edgecase, I think!)

     

    YIKES

     

    Would you like to raise a bug: https://bugbase.adobe.com/  ?  You discovered it, 'n' all.

     

    I'm amidst some communications with one of the CF10 engineers @ the mo', so I'll bring it to his attention as soon as you post back the bug ref.

     

    I will also say... that code in the classic.cfm debug template is HORRENDOUS.  It should be binned and rewritten by someone competent.  But that's nothing to do with this bug, it's just an observation.

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 9, 2012 4:07 PM   in reply to Matt Usher

    I've created the bug report.

     

     

    For others that are interested, the direct link to the ticket is https://bugbase.adobe.com/index.cfm?event=bug&id=3279677.

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 10, 2012 12:18 AM   in reply to Adam Cameron.

     

    I've created the bug report.

     

     

    For others that are interested, the direct link to the ticket is https://bugbase.adobe.com/index.cfm?event=bug&id=3279677.

     

     

    And, indeed, an already-existing bug for this is under: https://bugbase.adobe.com/index.cfm?event=bug&id=3207170.

     

    I've cross-referenced the two.

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 10, 2012 2:51 AM   in reply to Adam Cameron.

    Adam Cameron. wrote:

     

     

    I've created the bug report.

     

     

    For others that are interested, the direct link to the ticket is https://bugbase.adobe.com/index.cfm?event=bug&id=3279677.

     

     

    Hi Matt and Adam,

     

    Good detective work there.  +1, voted (for the new ticket) as follows:  I've verified this as well.  I created THIS.customTagPaths="c:\path\to\dir" where "dir" contains approx 500 folders and 2,000 files of any type.  Then I enabled CF Admin's "Report Execution Times" debug output setting and the resultant "Debug Rendering Time" was approx 15 seconds for the request.  Then I disabled the Report Execution Times setting and the resultant Debug Rendering Time was approx 60ms.  Repeated both scenarios a few times to be sure, and yes, 100% reproducible.  Window 7 64-bit.  I wasn't using expandPath() for the customTagPath btw, fwiw.

     

    Thanks,

    -Aaron

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 10, 2012 3:00 AM   in reply to itisdesign

    Maybe this is expected behavior, but if the THIS.customTagPaths points to a folder outside webroot, then CF doesn't seem to be able to locate the tags in that folder.  Even when no expandPath() is used.  I always use THIS.mappings/cfmodule, so I never noticed this before.  I'll mess w/ this later and compare to other versions of CF.  Just mentioning it FWIW.

     

    Thanks,

    -Aaron

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 10, 2012 3:18 AM   in reply to itisdesign

    I wasn't using THIS.customTagPaths, I was just setting 'em in CFAdmin (not this this is here or there, they'd behave the same way, I should think?).  And I do not expect this behaviour, because doing exactly the same thing in previous versions of CF doesn't exhibit this performance hit.  My expectation is that subsequent versions of CF show improvement in areas that change, not degradation.

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 10, 2012 4:20 AM   in reply to Adam Cameron.

    Hi Adam,

     

    By "Maybe this is expected behavior" I wasn't referring to this performance issue at all.  I was referring to a tangent that my mind went on, about a possible issue w/ THIS.customTagPaths="c:\some\path\above\webroot" not being able to locate tags in that 'outside of root' folder.  Regarding my tangent 'possible' issue, I'll start a new thread if I find anything new regarding it.

     

    Regarding this issue, it looks like the performance degrades as the total size of a request's custom tag "tree" (CF Admin defined paths + THIS.customTagPaths) increases.  Interesting.  I totally agree that this performance issue is not expected behavior and should be fixed of course.  And exactly, CF should always be improving and not the opposite.

     

    Thanks,

    -Aaron

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points