| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
_generate_paths_by_default wasn't used in AD::Routing::UrlFor, so we
should be able to move it where it is used in AV::Routing
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
this reduces the number of comparisons and method calls `url_for`
requires. The nil case no longer calls `symbolize_keys`, we already
know options is nil, so no more ||=, and since it is nil we already know
that options[:host] will be nil too.
|
| |
|
|
|