When writing a loop...

View: New views
3 Messages — Rating Filter:   Alert me  

When writing a loop...

by Karoly Negyesi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

... please always consider: can this loop become impossibly long? If
you are iterating over anything without set limits then the answer is
likely yes. Typically, nodes, files, users, terms, comments,
aggregator items, menu links are the things that some sites can easily
have millions of. Roles and vocabularies are an example which are very
unlikely to become unwieldy large.

Thanks

NK

Re: When writing a loop...

by Daniel F. Kudwien :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I guess that was some promotional work to teach developers to use Batch API
in core?

> -----Original Message-----
> From: development-bounces@...
> [mailto:development-bounces@...] On Behalf Of Karoly Negyesi
> Sent: Monday, July 06, 2009 6:22 PM
> To: Drupal development
> Subject: [development] When writing a loop...
>
> ... please always consider: can this loop become impossibly
> long? If you are iterating over anything without set limits
> then the answer is likely yes. Typically, nodes, files,
> users, terms, comments, aggregator items, menu links are the
> things that some sites can easily have millions of. Roles and
> vocabularies are an example which are very unlikely to become
> unwieldy large.
>
> Thanks
>
> NK
>


Re: When writing a loop...

by Karoly Negyesi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

And in contrib.

On Mon, Jul 6, 2009 at 9:44 AM, Daniel F. Kudwien<news@...> wrote:
> I guess that was some promotional work to teach developers to use Batch API
> in core?