| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
user passed `options[:delimited_regex]` if available. Changed `DELIMITED_REGEX` to `DEFAULT)DELIMITED_REGEX` to signify what it means.
- Added tests for number to delimited and number to currency in both actionview and activesupport.
Changes
Changes
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When the autoload_paths start to grows, this methods is quite a hotspot
>> ActiveSupport::Dependencies.autoload_paths.size
=> 49
>> Benchmark.ips { |x| x.report('baseline') { ActiveSupport::Dependencies.loadable_constants_for_path(File.expand_path('app/models/shop')) }}
Calculating -------------------------------------
baseline 90.000 i/100ms
-------------------------------------------------
baseline 1.073k (±20.2%) i/s - 4.950k
After the patch
Calculating -------------------------------------
patched 883.000 i/100ms
-------------------------------------------------
patched 11.050k (±19.7%) i/s - 50.331k
|
|\ \ \
| | | |
| | | | |
Removed duplicate require 'minitest/mock'
|
| | | |
| | | |
| | | |
| | | | |
method_call_assertions
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Initial implementation of ActiveJob AsyncAdapter.
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Added docs for TimeWithZone [ci skip]
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We have `caller_locations`, so we don't need to parse the strings in the
callstack.
|
| | | | |
|
| | | |
| | | |
| | | | |
`:nail_care:`
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
guides/source/security.md
|
| |\ \ \ \
| | | | | |
| | | | | | |
File renaming should be the last operation of an atomic write
|
| | | | | | |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
Correct cache store superclass in comment [ci skip]
|
| | | |/ / /
| | |/| | | |
|
| |\ \ \ \ \
| | |/ / / /
| |/| | | | |
Cleaned up generators tests using internal assertion helper
|
| | |/ / / |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The perf gain is relatively minor but consistent:
```
Calculating -------------------------------------
0.zero? 137.091k i/100ms
1.zero? 137.350k i/100ms
0 == 0 142.207k i/100ms
1 == 0 144.724k i/100ms
-------------------------------------------------
0.zero? 8.893M (± 6.5%) i/s - 44.280M
1.zero? 8.751M (± 6.4%) i/s - 43.677M
0 == 0 10.033M (± 7.0%) i/s - 49.915M
1 == 0 9.814M (± 8.0%) i/s - 48.772M
```
And try! is quite a big hotspot for us so every little gain is appreciable.
|
| | | | |
|
| |\ \ \
| | | | |
| | | | | |
Add method_source dependency to activesupport
|
| | | | | |
|
| |\ \ \ \
| | | | | |
| | | | | | |
Added helper methods to stub any instance
|
| | | | | | |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
Assert that the `:prefix` option of `number_to_human_size` is deprecated
|
| | | | | | | |
|
| |\ \ \ \ \ \
| | |/ / / / /
| |/| | | | | |
[ci skip] Documentation: Switch around a common phrase for readability
|
| | | |/ / /
| | |/| | | |
|
| | |/ / /
| |/| | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| |\ \ \ \
| | | | | |
| | | | | | |
Reload I18n.load_path in development
|
| | | | | | |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
[ci skip] Fix the AS::Callbacks terminator docs
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The second argument of the terminator lambda is no longer the result
of the callback, but the result lambda.
https://github.com/rails/rails/blob/3a7609e2bafee4b071fe35136274e6ccbae8cacd/activesupport/test/callbacks_test.rb#L553
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Using each_key is faster and more intention revealing.
Calculating -------------------------------------
each 31.378k i/100ms
each_key 33.790k i/100ms
-------------------------------------------------
each 450.225k (± 7.0%) i/s - 2.259M
each_key 494.459k (± 6.3%) i/s - 2.467M
Comparison:
each_key: 494459.4 i/s
each: 450225.1 i/s - 1.10x slower
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Discussion https://github.com/JuanitoFatas/fast-ruby/pull/59#issuecomment-128513763
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
cause issues if it is not idempotent
|
| |/ / / / |
|
| |\ \ \ \
| | | | | |
| | | | | | |
Fix the documentation of Hash#except method [ci skip]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
fix minor problems
|
| |/ / / / |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We can save a few objects by freezing the `replacement` string. We save a few more by down-casing the string in memory instead of allocating a new one. We save far more objects by checking for the default separator `"-"`, and using pre-generated regular expressions.
We will save 209,231 bytes and 1,322 objects.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
In `apply_inflections` a string is down cased and some whitespace stripped in the front (which allocate strings). This would normally be fine, however `uncountables` is a fairly small array (10 elements out of the box) and this method gets called a TON. Instead we can keep an array of valid regexes for each uncountable so we don't have to allocate new strings.
This change buys us 325,106 bytes of memory and 3,251 fewer objects per request.
|
| | | | |
|
| | | | |
|
| |\ \ \
| | | | |
| | | | | |
We need stricter locking before we can unload
|