Download & Extend

drupal_execute() consumes memory when creating many users during import

Project:Usernode
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

Creating a large amount of user accounts, in my case 25,000 in a single CSV import fails because the user_save() call in turn calls the usernode_user() and this is generating the usernode using drupal_execute().

The FormsAPI has icky static variables all over and during a large import is causing memory to be consumed quickly, resulting in my PHP script from exhausting available memory (100M!)

Is drupal_execute() really necessary over good old node_save() ?

Comments

#1

Status:active» fixed

hm, indeed, I'm not so a fan anymore of drupal_execute() too - but changing this would require a lot of new tests to ensure the stability of the module in any case, a lot of work - so it's not gonna happen.. ;)

#2

Status:fixed» closed (won't fix)

I got around the problem by making a separate menu callback in drupal which could process a chunk of CSV data then finish.
I then called the menu callback from the main import routine in a loop using drupal_http_request()

Worked perfectly.

nobody click here