Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


some worries about the performance? #529

dahakawang opened this Issue · 2 comments

3 participants

David Wang Konstantin Haase James Tucker
David Wang

hello everyone,
im new to rack, and found it amazing to be such a simple and easy to use library.

recently iv looked in to its code, and find following:

    def to_app
      app = @map ? generate_map(@run, @map) : @run
      fail "missing run or map statement" unless app
      @use.reverse.inject(app) { |a,e| e[a] }

    def call(env)

it seems every time when a new http request arrives the Rack will recreate the middleware stack, what i worry about is if it will have a bad impact on performance? is the recreation necessary?

Konstantin Haase

I have never run into a case where I was using a Rack::Builder instance as endpoint.

James Tucker

You are supposed to use the result of to_app as your app.

James Tucker raggi closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.