{"action":"created","issue":{"url":"https://api.github.com/repos/rails/sprockets/issues/84","labels_url":"https://api.github.com/repos/rails/sprockets/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/rails/sprockets/issues/84/comments","events_url":"https://api.github.com/repos/rails/sprockets/issues/84/events","html_url":"https://github.com/rails/sprockets/issues/84","id":99076627,"number":84,"title":"Performance regression while requiring lots of files","user":{"login":"redox","id":29529,"avatar_url":"https://avatars.githubusercontent.com/u/29529?v=3","gravatar_id":"","url":"https://api.github.com/users/redox","html_url":"https://github.com/redox","followers_url":"https://api.github.com/users/redox/followers","following_url":"https://api.github.com/users/redox/following{/other_user}","gists_url":"https://api.github.com/users/redox/gists{/gist_id}","starred_url":"https://api.github.com/users/redox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redox/subscriptions","organizations_url":"https://api.github.com/users/redox/orgs","repos_url":"https://api.github.com/users/redox/repos","events_url":"https://api.github.com/users/redox/events{/privacy}","received_events_url":"https://api.github.com/users/redox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/rails/sprockets/milestones/4","html_url":"https://github.com/rails/sprockets/milestones/3.x","labels_url":"https://api.github.com/repos/rails/sprockets/milestones/4/labels","id":1253820,"number":4,"title":"3.x","description":null,"creator":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":0,"state":"open","created_at":"2015-08-13T15:40:20Z","updated_at":"2015-08-20T20:51:32Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2015-08-04T22:41:58Z","updated_at":"2015-11-20T12:07:01Z","closed_at":null,"body":"Hi guys,\r\n\r\nI'm following [rails/sprockets-rails#225](https://github.com/rails/sprockets-rails/issues/225#issuecomment-126955594) and I would like to share with you a performance regression I'm experiencing after moving from **sprocket-rails** `2.1.3` to `3.0` or `master`.\r\n\r\nIt turns out that the issue is not in `sprocket-rails` but rather in the underlying `sprockets` since most of the time is spent resolving asset paths (cc @eileencodes).\r\n\r\nHere is what I'm seeing on my personal app (ruby-prof output):\r\n\r\n```\r\nMeasure Mode: wall_time\r\nThread ID: 70253745167340\r\nFiber ID: 70253756137300\r\nTotal: 1.518107\r\nSort by: self_time\r\n\r\n %self      total      self      wait     child     calls  name\r\n 19.84      0.302     0.301     0.000     0.000     1368   <Module::Marshal>#load_without_autoloading\r\n  5.71      0.087     0.087     0.000     0.000      143   Zlib::Inflate#inflate\r\n  4.60      0.070     0.070     0.000     0.000     1339   <Class::File>#utime\r\n  4.22      0.074     0.064     0.000     0.010     1908   Sprockets::URIUtils#join_file_uri\r\n  3.72      0.448     0.056     0.000     0.392     1339   Sprockets::EncodingUtils#unmarshaled_deflated\r\n  3.58      0.054     0.054     0.000     0.000    21137   String#scan\r\n  2.48      0.222     0.038     0.000     0.184    20937   Sprockets::Resolve#parse_path_extnames\r\n  2.16      0.033     0.033     0.000     0.000     4095   <Class::File>#exist?\r\n  2.03      0.031     0.031     0.000     0.000        2   SQLite3::Statement#step\r\n  1.77      0.055     0.027     0.000     0.029    20939   Array#reverse_each\r\n  1.75      0.048     0.027     0.000     0.021      302   Array#include?\r\n  1.74      0.028     0.026     0.000     0.002     7471  *String#gsub\r\n  1.63      0.025     0.025     0.000     0.000     1370   File#initialize\r\n  1.46      0.022     0.022     0.000     0.000   120894   String#==\r\n  1.42      0.052     0.022     0.000     0.031     1831   Sprockets::DigestUtils#digest\r\n  1.38      0.021     0.021     0.000     0.000    21201   <Class::File>#basename\r\n  1.32      0.020     0.020     0.000     0.000       20   <Class::Dir>#[]\r\n  1.29      0.020     0.020     0.000     0.000     3203   Regexp#===\r\n  1.28      0.161     0.019     0.000     0.141    20937   Sprockets::PathUtils#match_path_extname\r\n```\r\n\r\n<img width=\"750\" alt=\"screen shot 2015-08-01 at 13 41 11\" src=\"https://cloud.githubusercontent.com/assets/29529/9023504/04729e0a-3853-11e5-8988-e664a461801f.png\">\r\n\r\nAnd here is a small project reproducing the issue: [redox/perf_regression_sprockets](https://github.com/redox/perf_regression_sprockets#readme). In that application a page that took 20ms to be rendered using **sprockets-rails** `2.1.3` now takes **60ms** with the latest `master` branch.\r\n\r\nAny chance it could be related to the \"compat\" resolving layer? Let me know if I can help!"},"comment":{"url":"https://api.github.com/repos/rails/sprockets/issues/comments/158377914","html_url":"https://github.com/rails/sprockets/issues/84#issuecomment-158377914","issue_url":"https://api.github.com/repos/rails/sprockets/issues/84","id":158377914,"user":{"login":"mib32","id":8045292,"avatar_url":"https://avatars.githubusercontent.com/u/8045292?v=3","gravatar_id":"","url":"https://api.github.com/users/mib32","html_url":"https://github.com/mib32","followers_url":"https://api.github.com/users/mib32/followers","following_url":"https://api.github.com/users/mib32/following{/other_user}","gists_url":"https://api.github.com/users/mib32/gists{/gist_id}","starred_url":"https://api.github.com/users/mib32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mib32/subscriptions","organizations_url":"https://api.github.com/users/mib32/orgs","repos_url":"https://api.github.com/users/mib32/repos","events_url":"https://api.github.com/users/mib32/events{/privacy}","received_events_url":"https://api.github.com/users/mib32/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T12:07:01Z","updated_at":"2015-11-20T12:07:01Z","body":"@daniel-rikowski Yes, i think that is exactly what i was talking about. I think that debug mode is essential in development."}}