I have script which updating 2000-5000 nodes in loop and performance is poor. At the moment the code looks like:
foreach($nids as $nid) {
$node = node_load($nid);
// updating $node fields
node_save($node);
}
It's possible optimize it? I don't need revisions, call node_* hooks, just update data.