Dylan Tack's Blog

You should follow us on twitter or subscribe to our RSS feed if you want to stay on top of all the latest.

dylan's picture

A JMeter test plan for Drupal

Last week, I wrote about graphing JMeter results with Matplotlib. Let's take a closer look at the actual Drupal test plan. This plan was adapted from Jacob Singh's test and has five different thread groups: Anonymous browsing, Authenticated browsing, Editing a node, Search, and Login and view user page. The revised test plan is available for download. Read More…

dylan's picture

Plotting your load test with JMeter

If you've ever used JMeter, you know it's an awesome load testing tool. It also comes with a built-in graph listener, which allows you to watch JMeter do, well... something. While this gives a basic view of response time and throughput, it doesn't show failures, nor how the server responds as load increases. And let's face it, it's just plain ugly. Enter Matplotlib, a beautiful (though complex) plotting tool written in Python. Read More…

dylan's picture

A Git + Drupal Primer

Now that the Drupal community's migration to Git is in full swing, it's a great time to switch your own projects as well. Curious? Perhaps you saw the Git panel in San Francisco, or maybe you've listened to Sam Boyer campaigning passionately at your local DrupalCamp. Is there a rebel in your office who keeps going on about how much better life can be with git-svn? (How ironic that Subversion is now the establishment.) If you're just getting started, here are some tips I've collected over the last year. Or if you're already a Git ninja, here's how you can help. Read More…

dylan's picture

With Drupal+Ubercart, be wary of alternative payment gateways

If you are using Ubercart to do ecommerce with Drupal, be sure to use one of the mainstream payment gatways: Authorize.net or Paypal. While Ubercart does support a number of alternative payment gateways, the dangers in going with these alternatives are significant. Here's an example of a single day where two of the less well known Ubercart payment modules were exposed as having flaws that allow people to checkout without needing to pay: SA-CONTRIB-2010-062 - Ogone | Ubercart payment - Access Bypass SA-CONTRIB-2010-064 - Ubercart MIGS Payment Gateway - Web Parameter Tampering Read More…

dylan's picture

Revenge of the node comments: a pure jQuery comment pager

A previous post described how to reposition node comments with Drupal's hook_menu_alter(), to facilitate a tabbed interface. One side effect that popped up was pagers – when a pager link was clicked, the tab state got reset. The solution was to refresh the #comments div with AJAX. As an interesting twist, it uses the ability of jQuery's $() to construct a new DOM object from HTML. This means that no new menu callback is needed in Drupal; it fetches the comments directly from the href in the pager link. While a little inefficient, this technique has the cool benefit of being able to grab any content from anywhere on your site, with merely a URL and a selector. It also degrades gracefully for non-javascript users; since without JS the tabs appear as sequential blocks the pager will function normally. (The following code is based on the AJAX Comments project). Read More…

dylan's picture

Quick Drupal Cacherouter and Boost benchmarks

In the discussion following my last post about cron and the cache hit rate, I promised to do some testing of the different cacherouter backends, as well as Boost. Again, these tests focus on the needs of a smallish site with 500 nodes and 1200 requests per day. Boost is the clear winner for response time (which shouldn't be a surprise given that it allows the web server to deliver HTML files directly from disk). Read More…

dylan's picture

More complete breadcrumbs for Ubercart checkout

By default, Ubercart sets the breadcrumb on the checkout page to simply "Home", which I personally find a bit odd. Because it calls drupal_set_breadcrumb() late in the request cycle, it's not even possible to create menu links for use by the menu_breadcrumb or menutrails modules. Stranger still, the cart settings page offers a "Custom cart breadcrumb" text and URL option, but it's hard-coded to use a single link instead of a trail of links. Here is a small snippet that will set the breadcrumbs to mimic the URL paths, for example: Home › Cart › Checkout Read More…

dylan's picture

How Drupal's cron is killing you in your sleep + a simple cache warmer

A lot of what's written about performance tuning for Drupal is focused on large sites, and benchmarking is often done by requesting the same page over and over in an attempt to maximize the number of requests per second (à la ab). Unfortunately, this differs from the real world in two key ways: Read More…

dylan's picture

Repositioning node comments

A strange quirk in Drupal 6 hard-codes comment rendering into the node module. This makes it quite difficult to reposition comments, for instance under a set of tabs in the node template. Attempting this brings you crashing into the most dreaded rampart of Drupal theming; moving something out of it's vertical stack:comment_render($node) can easily be placed in your node template, but how on earth can the original display be removed? comment_render() is called by node_show(), which contains this nugget: if (function_exists('comment_render') && $node->comment) { $output .= comment_render($node, $cid); } Ouch. (Thankfully, this has been fixed in Drupal 7.) While it's tempting to fake it with jQuery, or CSS positioning, there is a way to fix this by overriding the page callback for node rendering. Here's a quick module that implements this solution: Read More…

Pages