1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionview
schneems 4d47220d7c Perf optimization for url_for called w/ Hash
Benchmarking the existing code:

```ruby
{ :only_path => options[:host].nil? }.merge!(options.symbolize_keys)) 
```

Against optimized code, that does not require a new hash or a merge:

```ruby
options = options.symbolize_keys
options[:only_path] = options[:host].nil? unless options.key?(:only_path)
options
```

We see a statistically significant performance gain:

![](https://www.dropbox.com/s/onocpc0zfw4kjxl/Screenshot%202014-08-14%2012.45.30.png?dl=1)

Updated to not mutate incoming parameters
2014-08-14 12:46:06 -05:00
..
lib Perf optimization for url_for called w/ Hash 2014-08-14 12:46:06 -05:00
test Merge pull request #16438 from agrobbin/input-placeholder-i18n 2014-08-14 06:46:17 -07:00
actionview.gemspec More liberal builder dependency 2013-12-12 20:03:02 +01:00
CHANGELOG.md add I18n support for :placeholder HTML option is passed to form fields 2014-08-12 23:11:43 -04:00
MIT-LICENSE update copyright notices to 2014. [ci skip] 2014-01-01 23:59:49 +05:30
Rakefile Running all isolated test for actionview 2013-10-03 00:00:50 +02:00
README.rdoc Feature requests should be made on the mailing list, not submitted to 2014-06-01 19:11:39 -07:00
RUNNING_UNIT_TESTS.rdoc [ci skip] /sqlite/i --> SQLite 2014-07-06 15:23:12 +05:30

= Action View

Action View is a framework for handling view template lookup and rendering, and provides
view helpers that assist when building HTML forms, Atom feeds and more.
Template formats that Action View handles are ERB (embedded Ruby, typically
used to inline short Ruby snippets inside HTML), and XML Builder.

== Download and installation

The latest version of Action View can be installed with RubyGems:

  % [sudo] gem install actionview

Source code can be downloaded as part of the Rails project on GitHub

* https://github.com/rails/rails/tree/master/actionview


== License

Action View is released under the MIT license:

* http://www.opensource.org/licenses/MIT


== Support

API documentation is at

* http://api.rubyonrails.org

Bug reports can be filed for the Ruby on Rails project here:

* https://github.com/rails/rails/issues

Feature requests should be discussed on the rails-core mailing list here:

* https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core