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

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.

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

Replies are listed 'Best First'.
Re^3: Module uses loads of CPU.. or is it me
by hsinclai (Deacon) on Dec 11, 2007 at 02:45 UTC
    Please see my update2 in OP

    -Harold