Performance: Form helpers (form_with)
MEDIUM IMPACT
This affects page load speed and interaction responsiveness by controlling how forms are rendered and submitted in Rails applications.
form_with model: @post, remote: true do |form|
form.text_field :title
form.submit 'Save'
endform_with model: @post, local: true do |form|
form.text_field :title
form.submit 'Save'
end| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| form_with local: true | Standard form elements | Triggers 1 reflow on submit (page reload) | Full page repaint | [X] Bad |
| form_with remote: true | Standard form elements + JS handlers | No reflow on submit | Partial repaint on response | [OK] Good |