Writing High Performance Drupal Modules

Track: 
Coder
Experience: 
Advanced

This talk is aimed at developers writing modules that have to perform well under heavy load and lots of traffic. We will present an overview of a number of techniques that we have used with success on high traffic Drupal sites. The programming techniques are straight forward; you don't need to be a rocket scientist or Einstein to write high performance code. An overview of topics we will discuss:

Basics
  • Memoization
  • Compsci basics
Pressflow
  • Don't set session data unless necessary (mobile_tools, show varnish alternative)
Caching
  • Memcache vs. Database
  • Locking
  • menu_callback_cache module
  • General Varnish tips
  • Using JS to avoid bypassing varnish cache
Queries
  • Materialized views
  • Master vs. slave
  • Forcing Views to use slave db
Cron
  • Offload cache filling
Turbo Button
  • Must be pressed
Performance testing
  • Testing with apache ab
  • Checking varnish headers
  • Devel query logging

Most of these points will be accompanied by code examples that we will talk through.

Intended audience: 

This talk is aimed at developers writing modules that have to perform well under heavy load and lots of traffic

Questions answered by this session
Question 1: 
Do I need to be a rocket scientist to make Drupal go fast?
Question 2: 
When should I consider performance when writing Drupal modules?
Question 3: 
What performance problems are not solved by more cache?
Question 4: 
How I can I test the performance of my module?
Question 5: 
Are there performance techniques I can use even if I don't have dedicated servers?
4.155555
Your rating: None Average: 4.2 (45 votes)

Comments

Great session!

Great session!

Diamond Sponsors

 
VPS NET
Palantir.net

Platinum sponsors

 
workhabit
Trellon

Gold Sponsors

 
Microsoft
Drupal Connect
Treehouse Agency
Duo
NorthPoint
HotDrupal.com
Chapter Three