0
DRUPAL 7 PERFORMANCE:ENTITY CACHEAshok Modi – July 25, 2011
Drupal 7 sure does some cool stuff.  Fields in core!  Everything is trying to be an entity.  Everything has the ability...
HOWEVER    Field API currently creates a table for each field.      Imagine  50 fields on one type of content…50 tables ...
Tough choices…    Write your own module to store multiple ‘fields’ in one     row       http://drupal.org/project/pbs   ...
Entity Cache to the rescue.  Caches the entity after it is loaded the first time   (including fields).  Call on the cach...
How do I install it?    Download the module.    Enable it and forget it!    Caching is pluggable.       Willwork just ...
Interested?    How can I help?       Test out some of the issues!       Try to get this into core –        http://drupa...
Questions? Gripes?    Thank you!
Upcoming SlideShare
Loading in...5
×

Entity cache

1,386

Published on

The why and how of installing the entity cache module.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,386
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
10
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Entity cache"

  1. 1. DRUPAL 7 PERFORMANCE:ENTITY CACHEAshok Modi – July 25, 2011
  2. 2. Drupal 7 sure does some cool stuff.  Fields in core!  Everything is trying to be an entity.  Everything has the ability to get displayed using various build modes (full, teaser, search index, search result come out of the box).  Was using Display Suite with views (and taking advantage of the build modes).
  3. 3. HOWEVER  Field API currently creates a table for each field.  Imagine 50 fields on one type of content…50 tables (plus 50 revision tables!)  Running a entity_load each time really blows when you only need a few fields to show up for a display mode.  Views also does a full entity_load  Due to the design of the Field API, entity_load is done unless you are only retrieving the title of the entity.  Drupal caches the results of the fields but only on a one-by-one basis.
  4. 4. Tough choices…  Write your own module to store multiple ‘fields’ in one row   http://drupal.org/project/pbs aims to tackle that but its not ready.  Switch over to using MongoDB (http://drupal.org/ project/mongodb)   Really fast.   Really cool.   Different way of thinking and not enough support on D.O yet.   Definitely look at http://drupal.org/project/efq_views though.
  5. 5. Entity Cache to the rescue.  Caches the entity after it is loaded the first time (including fields).  Call on the cache and serve that to the user.  Served until cache expires or until entity is updated / deleted.  Already supports all core entities (nodes, users, taxonomy, comments, files, vocabulary).  Easy to add support into other types of entities (rules? Media? Commerce? They can all be entitycache friendly).
  6. 6. How do I install it?  Download the module.  Enable it and forget it!  Caching is pluggable.   Willwork just fine with other backends like memcache, APC etc.  Help your server behave in a sane way.   Some sites will see great gains   Some maybe not as good (you can try another caching backend if you have a lot of data).
  7. 7. Interested?  How can I help?   Test out some of the issues!   Try to get this into core – http://drupal.org/node/597236   Check out the drush integration in the issues queue.   Cache all your entities with a single command (made by yours truly ).  Coming to DrupalCampLA?   Talkingand presenting on performance (frontend and backend)   See you there!
  8. 8. Questions? Gripes?  Thank you!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×