{"action":"created","issue":{"url":"https://api.github.com/repos/plataformatec/simple_form/issues/1227","labels_url":"https://api.github.com/repos/plataformatec/simple_form/issues/1227/labels{/name}","comments_url":"https://api.github.com/repos/plataformatec/simple_form/issues/1227/comments","events_url":"https://api.github.com/repos/plataformatec/simple_form/issues/1227/events","html_url":"https://github.com/plataformatec/simple_form/issues/1227","id":63439262,"number":1227,"title":"What is the expected slowdown of using SimpleForm?","user":{"login":"maxwell","id":69663,"avatar_url":"https://avatars.githubusercontent.com/u/69663?v=3","gravatar_id":"","url":"https://api.github.com/users/maxwell","html_url":"https://github.com/maxwell","followers_url":"https://api.github.com/users/maxwell/followers","following_url":"https://api.github.com/users/maxwell/following{/other_user}","gists_url":"https://api.github.com/users/maxwell/gists{/gist_id}","starred_url":"https://api.github.com/users/maxwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxwell/subscriptions","organizations_url":"https://api.github.com/users/maxwell/orgs","repos_url":"https://api.github.com/users/maxwell/repos","events_url":"https://api.github.com/users/maxwell/events{/privacy}","received_events_url":"https://api.github.com/users/maxwell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":25,"created_at":"2015-03-21T18:43:09Z","updated_at":"2015-07-10T01:00:21Z","closed_at":null,"body":"I was investigating some slow view rendering in our application.\r\n\r\n\r\nWe had a partial that was rendered many times, which looked like this.  I had perhaps stupidly opted out of most Simple Form goodness, but I guess for consistency's sake, thought this would be ok.\r\n```erb\r\n<div class='sortableItem variant' data-item-id='<%= f.object.id %>'>\r\n  <div class=\"variant-creator-row\">\r\n    <div class=\"variant-details\">\r\n      <%= f.input :text, label: false, wrapper: false, as: :string %>\r\n    </div>\r\n    <div class=\"variant-option-value\">\r\n      <%= f.input :option_1_value, label: false, wrapper: false %>\r\n    </div>\r\n    <div class=\"variant-option-value\">\r\n      <%= f.input :option_2_value, label: false, wrapper: false %>\r\n    </div>\r\n    <div class=\"variant-option-value\">\r\n      <%= f.input :option_3_value, label: false, wrapper: false %>\r\n    </div>\r\n\r\n    <div class=\"variant-hidden\">\r\n      <%= f.input :hidden, label: false,  wrapper: false %>\r\n    </div>\r\n    \r\n    <div class=\"variant-delete survey-answer-delete\">\r\n      <a href=\"#\" class=\"text text-danger\">delete</a>\r\n      <div class=\"hidden\">\r\n        <%= f.input_field :_destroy, as: :boolean, label: false, wrapper: false %>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div>\r\n\r\n<%= f.hidden_field :field_kind, value: 'multiple_choice' %>\r\n```\r\nWorth noting, this f value is coming from a \"simple_fields_for\" call.\r\n\r\n\r\nThis partial was getting rendered many times, and looking at my logs, each one was taking > 200 milliseconds!  eek!\r\nhttps://gist.github.com/maxwell/12cd7e949cae4ea60766\r\n\r\nChanging this to just be normal Rails helpers **radically** reduced render time, to about 5 milliseconds per partial, 40x faster!\r\n\r\nhttps://gist.github.com/maxwell/f7b6c1bc6625f6b5c3e7\r\n\r\n\r\n I realize that it is reasonable to know that there would be some overhead, and perhaps one should not use SimpleForms for **simple** forms which are rendered many times, but is this the kind of overhead we should expect?  Am I doing something incredibly stupid to cause this behavior?\r\n\r\nI am currently using  simple_form (3.1.0.rc1), and Rails 4.1.10\r\n\r\n\r\nI love using SimpleForm, thanks so much for all the hard work  you guys put into it!\r\n"},"comment":{"url":"https://api.github.com/repos/plataformatec/simple_form/issues/comments/120188971","html_url":"https://github.com/plataformatec/simple_form/issues/1227#issuecomment-120188971","issue_url":"https://api.github.com/repos/plataformatec/simple_form/issues/1227","id":120188971,"user":{"login":"diegorv","id":24455,"avatar_url":"https://avatars.githubusercontent.com/u/24455?v=3","gravatar_id":"","url":"https://api.github.com/users/diegorv","html_url":"https://github.com/diegorv","followers_url":"https://api.github.com/users/diegorv/followers","following_url":"https://api.github.com/users/diegorv/following{/other_user}","gists_url":"https://api.github.com/users/diegorv/gists{/gist_id}","starred_url":"https://api.github.com/users/diegorv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diegorv/subscriptions","organizations_url":"https://api.github.com/users/diegorv/orgs","repos_url":"https://api.github.com/users/diegorv/repos","events_url":"https://api.github.com/users/diegorv/events{/privacy}","received_events_url":"https://api.github.com/users/diegorv/received_events","type":"User","site_admin":false},"created_at":"2015-07-10T01:00:21Z","updated_at":"2015-07-10T01:00:21Z","body":"done @josevalim :)"}}