in reply to Module uses loads of CPU.. or is it me

perhaps xml parsing is the culprit for CPU usage due to the many nested levels - how would I confirm this?

You could confirm that through profiling. See Profiling your code.

P. S. — I'd be interested to hear what the results say.

  • Comment on Re: Module uses loads of CPU.. or is it me

Replies are listed 'Best First'.
Re^2: Module uses loads of CPU.. or is it me
by Anonymous Monk on Dec 10, 2007 at 22:10 UTC
    Hi hsinclai,

    Have you considered using a while loop as opposed to your foreach?

    If I remember correctly, a foreach loop is more intensive as it requires an underlying structure to be created to iterate. A while loop does not need to do that and is generally a little faster.

    Maybe give that a shot.

      Please see my update2 in OP

      -Harold