performance

A destruct() Flush Turns Thousands of Redundant Saves Into Hundreds

Submitted by charles on
Batching operations that trigger an same event subscriber can cause performance problems if that subscriber runs expensive operations. Here's how that happened, and the small change that fixed it without slowing the events down at all: accumulate the work as it comes in, and do it once at shutdown.

Cache-Control: max-age header missing from static files in Drupal

Submitted by charles on

One of the sites I maintain recently had a server upgrade to Ubuntu 14.04.4, which included a new version of varnish (version 3.05) which required an update to the Varnish configuration. After setting up a new default.vcl file I was monitoring the headers sent and received to make sure that what was supposed to be cached was in fact being cached by Varnish. While testing I discovered that I was not getting any Cache-Control headers from static files like images.