开发者

Rails 3.0.0.rc profiling: Thousands of Regexp#===(d1) calls

开发者 https://www.devze.com 2023-01-09 08:23 出处:网络
I was getting 0.5 reqs/s on the front page of my rails app (a very simple, mostly static page that made a couple of database calls, but nothing that WEBrick said took longer than 0.8 ms), served with

I was getting 0.5 reqs/s on the front page of my rails app (a very simple, mostly static page that made a couple of database calls, but nothing that WEBrick said took longer than 0.8 ms), served with thin. I added ruby-prof profiling tools to my ApplicationC开发者_如何学Pythonontroller via the instructions at Dan Mange's blog and dumped the call graph to standard out.

Here's a little bit of the graph: http://pastie.org/1063281

It seems absurd, but googling for "Regexp#===" finds nothing interesting.

Anyone seen anything like this? Better yet, know how to fix it?

Here's my Gemfile:

gem 'rails', '3.0.0.rc'
gem 'thin'
gem 'capistrano'
gem 'nokogiri'
gem 'pg'
gem 'authlogic', :git => 'git://github.com/binarylogic/authlogic.git'
gem 'paperclip'
gem 'bundler'
gem 'ruby-prof'
gem 'daemons'


I'd recommend trying some of the other ruby-prof outputs. If you grab it from github there have been a few added recently (but not yet released).

http://github.com/rdp/ruby-prof

0

精彩评论

暂无评论...
验证码 换一张
取 消