2

Say I'm building a view that lists 30 nodes. My understanding is that using fields in the view is faster than content (teaser), because the latter would need to call node_load 30 times? At least, I think this was the case with D6.

I appreciate the performance of both options depends on number of fields and types of fields used (entity reference, dates etc add query overhead). But does anyone have a general steer on this?

Thanks

2 Answers 2

4

In D7 it is the same, because the node (or any other parent entity) needs to be loaded in order for a field to be displayed (that's how Field API works in D7).

2
  • To get an appreciable difference in load time, you'd have to skip the View entirely and used db_select() to run a custom query from code.
    – beth
    Dec 18, 2012 at 17:35
  • In which case you wouldn't be able to apply any formatter to a field value, making it almost-useless. Dec 18, 2012 at 22:13
0

Actually as far as I know with cache enabled using teasers is actually faster as teasers can be cached efficiently.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.