Home > dm-problem

dm-problem

Dm-problem is a project mainly written in Ruby, it's free.

Illustrating a problem with dm-rails slowing down development over subsequent requests

The Problem

Requests to the rails stack (with dm-rails, dm-postgres) in development irrespective as to whether a model is queried, cause the next response to be slightly slower.

The problem is exacerbated in larger apps. On a larger app (20 models), we're noticing respones times in dev increase cumulatively by +20msec p/req which adds up very quickly.

This is a very barebones app -> check the Gemfile and the one model.

To replicate

  1. Clone, db:create, db:automigrate and start the app.
  2. Run @ben_h's schmark which runs many requests against localhost:3000

    ruby script/ben-schmark.rb 

Over many hunderds of requests, the response time increases. This does not happen with just activerecord leading me to think it is a problem with dm-rails. I've tested with dm-sqlite-adapter and with the postgres adapter - they both exhibit the same result of slowing down the dev environment over time.