datamapper / do

DataObjects
147 stars 74 forks source link

DataObjects' pool size is 8. It really should be configurable. #60

Open rtyler opened 11 years ago

rtyler commented 11 years ago

This was originally reported against the dm-core project by @kapso, I figured I'd open up the issue here since I can't seem to find one already.

It's understandable why the pool size is always 8, but I really think that should be configurable :)

I'm experimenting with a monkey-patch cited in this StackOverflow post, which is roughly

DB_POOL_SIZE = 12

class DataObjects::Pooling::Pool
  alias :initialize_old :initialize
  def initialize(max_size, resource, args)
    initialize_old(DB_POOLSIZE, resource, args)
  end
end

I figure if this is more configurable, then dm-core can support configuring it, and help me avoid this whole monkey-patching business

seanhagen commented 9 years ago

:+1: Being able to set the pool size would be great.