Hi,

node_save() is performance penalty and works very similar to field_attach_insert() and field_attach_update(). I'm surprised to see it in dragableviews Field API handler. Is there some reason for this?

node_save() is hard process and can be extended in various ways. In my particular case each node_save() contacts remote service and gets some additional data and I want to be careful with issuing node save commands.

#1353738: 7.x-2.x FieldAPI handler touches this after marked as fixed.

Comments

ygerasimov’s picture

I completely agree that node_save() is quite expensive operation and understand your concerns. But draggableviews are not really designed to update a lot of records at once and also it is important that all hooks get fired for all nodes as I remember people used rules to react on sorting of nodes. So I do not want to do this API change at the moment.

Regarding your case I would suggest to create your custom Field API handler that will do field_attach_insert() or field_attach_update() depending on the node. That will be way more efficient. Maybe you can even share this code here so other people will use it.

Please let me know if you need any further assistance.

istryker’s picture

This issue is old. It now does an entity_save in the fieldAPI handler.