Comments (15)
Yep, debuggers makes things slower.
Do you find this too annoying? Not sure how much room there's for improvement and whether it is worth it.
from pry-byebug.
I don't know how much worth too.
At least It's a annoying for me.
In my main project.
Page load time is increase to about 15 seconds from few seconds.
Other people are how's it going?
from pry-byebug.
@kntmrkm Can you confirm this is reproduced using byebug only, open an issue and byebug's repo and link to this one there? Thanks.
from pry-byebug.
my page time goes from seconds to about a minute
from pry-byebug.
Thanks guys for your reports.
I would just ask you to give objective numbers instead of biased stuff. "from x seconds to y seconds" is much more useful than "to about 15 seconds from few seconds" or "from seconds to about a minute".
from pry-byebug.
Well, looking at my log, it looks like the response time after binding.pry ranges from 40 seconds to well over a minute...
from pry-byebug.
Again not very specific, but got it. Thanks.
from pry-byebug.
does it not happen for you?
from pry-byebug.
Of course, debuggers slow things down, that's normal. But it never got too bad in my apps.
In any case, I have an idea on how to improve this.
from pry-byebug.
This seems to increase our page load 10x. I did some analysis and have these load times from our home page:
Before
Completed 200 OK in 2317ms (Views: 2174.1ms)
Completed 200 OK in 2424ms (Views: 2283.9ms)
Completed 200 OK in 1624ms (Views: 1617.3ms)
Completed 200 OK in 1682ms (Views: 1667.9ms)
After
Completed 200 OK in 32467ms (Views: 32290.0ms)
Completed 200 OK in 18576ms (Views: 18498.0ms)
Completed 200 OK in 20572ms (Views: 20429.7ms)
Completed 200 OK in 19399ms (Views: 19326.8ms)
I've found that restarting the server is a lot faster than waiting for multiple page loads of this duration.
from pry-byebug.
Also experiencing this issue:
> rails s
Completed 200 OK in 1625ms (Views: 1062.8ms | ActiveRecord: 114.6ms)
Completed 200 OK in 319ms (Views: 232.7ms | ActiveRecord: 43.8ms)
Completed 200 OK in 313ms (Views: 228.3ms | ActiveRecord: 43.4ms)
Completed 200 OK in 330ms (Views: 241.1ms | ActiveRecord: 45.1ms)
Completed 200 OK in 301ms (Views: 216.4ms | ActiveRecord: 43.9ms)
ruby ~2.0% CPU
after inserting one binding.pry
, hitting that breakpoint, removing it and refreshing the page:
Completed 200 OK in 7361ms (Views: 5164.5ms | ActiveRecord: 992.0ms)
Completed 200 OK in 7423ms (Views: 5236.2ms | ActiveRecord: 932.3ms)
Completed 200 OK in 7434ms (Views: 5160.5ms | ActiveRecord: 1062.8ms)
Completed 200 OK in 7481ms (Views: 5263.7ms | ActiveRecord: 876.3ms)
Completed 200 OK in 7296ms (Views: 5077.4ms | ActiveRecord: 986.1ms)
and
ruby 99.7-100.4% CPU
Relevant Gemfile group:
group :development, :test do
gem 'capybara', '~> 2.4.1'
gem 'rspec-rails'
gem 'rspec-activemodel-mocks'
gem 'rspec-collection_matchers'
gem 'jasmine'
gem 'jasmine-headless-webkit'
gem 'premailer'
gem 'spring'
# spring/rspec binstubs
gem 'spring-commands-rspec'
# rspec guard watcher for TDD
gem 'guard-rspec', require: false
gem 'pry', '~> 0.10.0'
gem 'pry-rails'
group :darwin do
# filesystem api events in mac osx
gem 'rb-fsevent'
end
group :pry do
gem 'pry-byebug'
end
end
lock:
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-byebug (3.1.0)
byebug (~> 4.0)
pry (~> 0.10)
pry-rails (0.3.4)
pry (>= 0.9.10)
from pry-byebug.
Thanks, I'll fix this as soon as possible.
from pry-byebug.
Our team is seeing this as well: any requests to Rails after entering and exiting a binding.pry
session is very slow with the process seemingly locking up for 5-10 seconds.
Let me know if I can be of any help chasing this down, @deivid-rodriguez.
from pry-byebug.
I'm seeing this too.
Before: 900ms
After: 13,500ms
from pry-byebug.
Closing in favor of deivid-rodriguez/byebug#144
from pry-byebug.
Related Issues (20)
- It's possible to start a REPL session passing a command? HOT 1
- Loading pry-byebug on Archlinux fails with "cannot load such file -- irb" HOT 1
- Newest version of Pry breaks pry-byebug HOT 15
- Pry Byebug specifies an older version of Pry HOT 1
- Deprecation warnings in Ruby 2.7 HOT 2
- Pry "next" alias does not work
- Any plans for a new release? HOT 4
- less: unrecognized option: X HOT 1
- PR proposition : Deprecated - Pry.config.control_d_handler HOT 6
- Repeated newlines in multi-line strings are ignored
- NameError: undefined local variable or method `text' for #<PryByebug::BreakCommand HOT 2
- New release? HOT 2
- Deprecation warnings Pry v 0.14.1 on Ruby v 3.1.1 HOT 1
- Relax restriction for byebug version HOT 5
- The version 3.10.0 breaks rails console HOT 8
- Build failure with ruby-pry-byebug version 3.9.0-1
- Run error using Ruby 3.2 HOT 1
- Deprecation on Ruby 3.2.2
- Compatibility Inquiry: pry-byebug 3.10.1 with Ruby 3.3.0
- Question: Is there a recommended way of requiring the gem for test but not CI?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pry-byebug.