We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
rails changelog
Welcome to the latest updates! We've got some nifty improvements and essential bug fixes to share. Let's dive in! π
New feature: Optimized HashWithIndifferentAccess#to_hash
We've turbocharged the HashWithIndifferentAccess#to_hash
method! π Instead of the inefficient process of starting from an empty hash and inserting keys one by one, we now directly convert the hash to an array and transform the values. This means fewer reallocations and re-hashing of keys. Plus, we've introduced a dedicated method to convert values to hashes, eliminating unnecessary checks. Benchmark tests show a significant speed boostβup to 1.62x faster! π
Bugfix: Deadlock in ConnectionPool#checkout
No more deadlocks! π οΈ We've fixed a critical issue in the ConnectionPool#checkout
method that caused deadlocks when multiple threads tried to access the connection pool simultaneously. By implementing a new locking mechanism, we've ensured that threads can safely check out connections without causing conflicts. Smooth sailing ahead! π
Improvement: Deprecation Changelog for bin/rake stats
Out with the old, in with the new! π We've added a deprecation changelog entry for the bin/rake stats
command in favor of bin/rails stats
. This update is part of our ongoing efforts to streamline and modernize our tools. Keep an eye on the changelog for more details!
Bugfix: Fixed Broken Links in Dev Containers Start Guide
Say goodbye to broken links! π We've updated the URLs in the Dev Containers start guide from markdown to HTML format. Now you can seamlessly follow the guide and set up your Rails application in a container without any hiccups. Happy coding! π»
Improvement: Documented immutable Option in expires_in
We've added documentation for the immutable
option in the expires_in
method. π When set to true, this option adds the immutable
directive to the Cache-Control header, indicating that the response body won't change over time. Perfect for long-term caching! ποΈ
Chore: Updated CHANGELOG.md
Routine housekeeping! π§Ή We've updated the CHANGELOG.md
file to document recent changes. This update was co-authored by Petrik de Heus. Thanks, Petrik! π
That's all for now! Keep those updates coming and happy coding! π
Included Commits
This commit adds documentation for the immutable
option in the expires_in
method in the ConditionalGet
module of Action Pack. The immutable
option, when set to true, adds the immutable
directive to the Cache-Control header. This directive indicates that the response body will not change over time, making it suitable for long-term caching.
The documentation also mentions that any additional key-value pairs provided will be concatenated as directives in the Cache-Control header. This update provides clarity on how to use the immutable
option and its implications for caching responses in Rails applications.
Files changed
- actionpack/lib/action_controller/metal/conditional_get.rb
This commit adds a deprecation changelog entry for the bin/rake stats
command in favor of using bin/rails stats
. The changelog entry was made in the railties/CHANGELOG.md
file, with 4 additions and no deletions. This deprecation was related to issue #47713 and was contributed by Juan VΓ‘squez.
Additionally, the commit also includes the addition of an internal page /rails/info/notes
that displays the same information as bin/rails notes
, contributed by Deepak Mahakale.
Files changed
- railties/CHANGELOG.md
This commit updates the CHANGELOG.md file. It appears that there were changes made to the project, but the specific details of these changes are not mentioned in the commit message. Additionally, it states that the commit was co-authored by Petrik de Heus, indicating that multiple contributors were involved in making these updates to the file. Overall, this commit seems to be a routine update to document changes made to the project.
Files changed
This commit optimizes the to_hash
method in the HashWithIndifferentAccess
class by avoiding the inefficient process of creating a copy by starting from an empty hash and inserting keys one by one. Instead, the new approach directly converts the hash to an array and transforms the values, saving on unnecessary reallocations and re-hashing of keys. Additionally, a dedicated method is defined to convert values to hashes, eliminating the need for generic convert_value
checks.
The commit includes benchmark tests comparing the original method with the optimized versions (KwstannardHWIA
and ByrootHWIA
). The results show that the optimized versions are significantly faster, with the ByrootHWIA
implementation outperforming the others in terms of speed, especially for larger hashes. Overall, these changes improve the efficiency of converting HashWithIndifferentAccess
objects to regular hashes, enhancing performance in scenarios with varying hash sizes and deep nesting levels.
Files changed
This commit fixes a deadlock issue in the ConnectionPool#checkout
method. The issue was causing a deadlock when multiple threads were trying to access the connection pool simultaneously. The fix involves implementing a new locking mechanism to prevent multiple threads from accessing the connection pool at the same time, thus resolving the deadlock issue. This ensures that threads can safely check out connections from the pool without causing a deadlock.
Overall, this commit addresses a critical issue in the connection pool functionality by implementing a new locking mechanism to prevent deadlocks. This fix ensures that multiple threads can safely access the connection pool without causing conflicts, improving the reliability and efficiency of the connection pool functionality.
Files changed
This commit fixes broken links in the Dev Containers start guide by updating the URLs in the guide from pointing to a markdown file to an HTML file. The changes made in the getting_started_with_devcontainer.md
file include modifying the URLs in the guide to ensure that users can access the correct information when setting up a Rails application in a container without needing to install Rails or its dependencies directly on their machine. By updating the URLs to HTML format, users can now follow the guide seamlessly and continue building their application by following the Getting Started guide.
The modifications made in this commit aim to improve the user experience and ensure that users can access the necessary information without encountering broken links. By updating the URLs in the guide to the correct format, users can now easily navigate through the guide and set up their Rails application in a container using the Dev Containers start guide provided. This fix addresses any issues related to broken links and ensures that users have a smooth experience when following the guide to set up their development environment for Rails applications.
Files changed
- guides/source/getting_started_with_devcontainer.md