Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache to_time and to_datetime for performance
As demonstrated in #25880 the to_time method converts the utc time instance to a local time instance which is an expensive operation so since ActiveSupport::TimeWithZone is a value object and shouldn't be mutated we can safely cache it without worrying about invalidation.
- Loading branch information
Showing
2 changed files
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -293,3 +293,6 @@ DEPENDENCIES | |
turbolinks | ||
uglifier (>= 1.3.0) | ||
w3c_validators | ||
|
||
BUNDLED WITH | ||
1.12.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters