I'm working on a custom module that exposes a new node type. When the node type is edited/created it generates a massive amount of new nodes (about 11,000) as well as deleting the previous nodes that were generated (the previous 11,000.) As you might imagine this is taking quite a long time. Currently I'm creating each node with node_save() and deleting each node with node_delete(). Now I can go outside the box and run blanket delete statements on the tables as well as looking into some type of faster insert. But I'm wondering if there are other ways I can go about this.

Has anyone had to deal with inserts and deletes of this magnitude? Any suggestions?

Thanks,

Nathan

Comments

sugardave’s picture

I'm having a problem with my "massive" amount of nodes, but nowhere near your total. I'm trying to add about 1500-2000 nodes, but Drupal keeps bombing on me at about the 300 mark. I am using Drupal 6, however. Any suggestions would be awesome.

EDIT: Ah, looks like I need to examine the batch_module example.