Skip to main content
Participant
November 3, 2010
Question

cf7/mx - adding 'mode' attribute to cffile makes it super slow

  • November 3, 2010
  • 1 reply
  • 281 views

Hello,

I am using CF7 / MX. I have noticed that in my environment there is a HUGE difference in execution time if I add the "mode" (i.e. chmod) attribute to a cffile write action.

For instance,

<cffile 
     action="write"
     file="#dir#/without-mode.txt"
     output="this file written #now()# without any mode">

takes about 7 ms to run, while

<cffile 
     action="write"
     file="#dir#/with-mode-644.txt"
     output="this file written #now()# with mode 644"
     mode="644">

takes multiple (2-4) seconds.

This is mainly happening for me in just one environment, but in other environments (and other versions of CF) i still see a similar pattern where a write action with the "mode" attribute takes much longer (10-1000x) longer to execute.

So my questions are:

  - Can anyone give me any idea what is going on?

  - Can anyone suggest a way to "fix" it?

(I suppose I can just avoid using the "mode" attribute, but I am concerned that this is a symptom of a greater problem, which would also have other symptoms that I haven't pinned down as well yet. So I would rather understand and fix the problem.)

Thank you.

    This topic has been closed for replies.

    1 reply

    syrrejAuthor
    Participant
    November 24, 2010

    OK, I don't know what the rules are here...but I'm going to bump this once because it is extremely weird and I can't figure out what is going on (system calls getting backed up in a queue or something? does the chmod() do a system call while the 'ordinary' cffile-write does not? etc)