{"action":"created","issue":{"url":"https://api.github.com/repos/rspec/rspec-expectations/issues/773","labels_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/773/labels{/name}","comments_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/773/comments","events_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/773/events","html_url":"https://github.com/rspec/rspec-expectations/pull/773","id":68785039,"number":773,"title":"Generating diffs of large objects consumes enough CPU to freeze the average computer","user":{"login":"YorickPeterse","id":86065,"avatar_url":"https://avatars.githubusercontent.com/u/86065?v=3","gravatar_id":"","url":"https://api.github.com/users/YorickPeterse","html_url":"https://github.com/YorickPeterse","followers_url":"https://api.github.com/users/YorickPeterse/followers","following_url":"https://api.github.com/users/YorickPeterse/following{/other_user}","gists_url":"https://api.github.com/users/YorickPeterse/gists{/gist_id}","starred_url":"https://api.github.com/users/YorickPeterse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YorickPeterse/subscriptions","organizations_url":"https://api.github.com/users/YorickPeterse/orgs","repos_url":"https://api.github.com/users/YorickPeterse/repos","events_url":"https://api.github.com/users/YorickPeterse/events{/privacy}","received_events_url":"https://api.github.com/users/YorickPeterse/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-15T20:55:06Z","updated_at":"2015-04-16T11:18:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rspec/rspec-expectations/pulls/773","html_url":"https://github.com/rspec/rspec-expectations/pull/773","diff_url":"https://github.com/rspec/rspec-expectations/pull/773.diff","patch_url":"https://github.com/rspec/rspec-expectations/pull/773.patch"},"body":"When certain expectations fail RSpec will try to generate diff of the expected and received values. Usually this works fine, except when those values are 6000 line long HTML documents parsed using Nokogiri (or any other operation using big objects). In such a case generating a diff will consume enough CPU usage to at least freeze my Macbook Pro, requiring a hard reboot to make it usable again.\r\n\r\nRepro: https://gist.github.com/YorickPeterse/ff2919edb411d9b2689e\r\n\r\nSave the script somewhere and run it using either `ruby script.rb` or `rspec script.rb`. If you're using a laptop you'll want to take it off your lap and plug in the charger first."},"comment":{"url":"https://api.github.com/repos/rspec/rspec-expectations/issues/comments/93710902","html_url":"https://github.com/rspec/rspec-expectations/pull/773#issuecomment-93710902","issue_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/773","id":93710902,"user":{"login":"JonRowe","id":162976,"avatar_url":"https://avatars.githubusercontent.com/u/162976?v=3","gravatar_id":"","url":"https://api.github.com/users/JonRowe","html_url":"https://github.com/JonRowe","followers_url":"https://api.github.com/users/JonRowe/followers","following_url":"https://api.github.com/users/JonRowe/following{/other_user}","gists_url":"https://api.github.com/users/JonRowe/gists{/gist_id}","starred_url":"https://api.github.com/users/JonRowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonRowe/subscriptions","organizations_url":"https://api.github.com/users/JonRowe/orgs","repos_url":"https://api.github.com/users/JonRowe/repos","events_url":"https://api.github.com/users/JonRowe/events{/privacy}","received_events_url":"https://api.github.com/users/JonRowe/received_events","type":"User","site_admin":false},"created_at":"2015-04-16T11:18:06Z","updated_at":"2015-04-16T11:18:06Z","body":"Hmm, no theres more to it. The autorun example actually doesn't blow up for me, but inserting it into RSpecs own spec suite does."}}