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.
In reply to Re^2: Module uses loads of CPU.. or is it me
by Anonymous Monk
in thread Module uses loads of CPU.. or is it me
by hsinclai
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |