サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
アメリカ大統領選
railsatscale.com
In the first half of 2024, Ruby LSP has seen significant enhancements, particularly in the area of code navigation, thanks to the advancement of its indexer. In this post, we’ll dive into the major code navigation enhancements that have been made to Ruby LSP. We’ll also touch on some experimental features that are on the horizon. NOTE While the Ruby LSP server (ruby-lsp gem) can be integrated with
As a core part of the Ruby ecosystem, IRB (Interactive Ruby) is an invaluable tool for developers. With its rapid pace of changes and improvements, staying up-to-date with the latest features can significantly enhance your development workflow. In this post, we’ll cover the significant updates to IRB from the first half of 2024 (between v1.11.0 and v1.14.0), as well as enhancements in the Rails Co
This blog post is adapted from a talk that Adam Hess and I gave at RubyKaigi 2024. Until recently, Ruby lacked a mechanism for detecting native-level memory leaks from within Ruby and native gems. This was because, when Ruby terminates, it does not free the objects that are still alive or the memory used by Ruby’s virtual machine. This is because the system will reclaim all the memory used anyway,
The inspect method on Active Record models returns a string including the model’s class and a list of all its attributes and their values. In Rails 7.2, you can configure which attributes are included in the output of inspect. In this post, I’ll discuss the performance issue that led me to implement this feature. I’ll also talk about how this feature can be used to improve developer experience. to
This article was adapted from my Rails World talk “Rails and the Ruby Garbage Collector: How to Speed Up Your Rails App”. Ruby’s garbage collector is designed to be adaptable, scaling from short Ruby scripts to running apps that serve millions of requests per second. While it’s designed to be adaptable, it may not work optimally for every use case. For this reason, Ruby’s garbage collector support
In Ruby 3.3.0, a new standard library was added to CRuby called Prism. Prism is a parser for the Ruby language, exposed as both a C library (optionally usable by CRuby) and a Ruby library (usable as a Ruby gem). The Prism project represents many person-years worth of effort, and is the result of a collaboration between Shopify, CRuby core contributors, other Ruby implementation authors, and Ruby t
In September, 2020, our team at Shopify released a Ruby gem named Packwerk, a tool to enforce boundaries and modularize Rails applications. Since its release, Packwerk has taken on a life of its own, inspiring blog posts, conference talks, and even an entire gem ecosystem. Its popularity is an indication that Packwerk clearly filled a void in the Rails community. Packwerk is a static analysis tool
This year, the YJIT team has been working hard to improve and optimize YJIT. We’re proud to say that the version of YJIT to be included with Ruby 3.3 is leaps and bounds ahead of Ruby 3.2’s. It provides better performance across the board, while also warming up faster and using less memory. The 3.3 release is also more robust, including a number of bug fixes along with an improved test suite. In t
This year, the YJIT team and I have gotten a paper accepted at MPLR 2023 (Managed Programming Languages and Runtimes), which is now freely available through ACM open access. The paper, titled “Evaluating YJIT’s Performance in a Production Context: A Pragmatic Approach”, goes into details of the strategy taken to evaluate YJIT’s performance in a production context. One of our key findings, when com
One major internal change in Ruby 3.2 was the introduction of object shapes. In this post, we’ll try to cover why they were introduced, how they work, and what their limitations are. How object instance variables are stored Because of how dynamic Ruby is, an operation as simple as accessing an instance variable is a lot of work. In most cases, Ruby objects store their instance variables in an arra
Over the last year, I’ve been working on a new Ruby application server called Pitchfork. In most regards it’s extremely similar to the venerable Unicorn, from which it originates, but with one major extra feature: Reforking, which reduce memory usage of Ruby applications. For most of last year, we couldn’t enable reforking on our application because of an incompatibility with one of our dependenci
Ruby 3.2 YJIT is Battle-Tested Shopify deploys YJIT on business-critical services in production, such as Storefront Renderer, the software that powers all online storefronts on Shopify’s platform, and Shopify’s Monolith. As of the Ruby 3.2 release, YJIT sped up our Storefront Renderer by 10% on average. Storefront Renderer is a complex application. Your more reasonable-sized app might get better/w
Ruby Outperforms C: Breaking the Catch-22 Ruby is an expressive, and fun language to write. It helps us get our job done quickly by allowing us to easily get our thoughts written down as executable code. That said, sometimes the code we write doesn’t perform as well as we would like. In those circumstances, one common solution in both Ruby and Python has been to rewrite the slow code as C extensio
We’ve open sourced shopify-ruby-definitions, which contains definitions to build the Ruby we use at Shopify in development, testing, and production. Our builds of Ruby are API compliant with the vanilla Rubies, but with additional bug fixes and performance improvements we’ve backported from the next major version. Why we use custom builds of Ruby Shopify has one of the largest and highest traffic
At Shopify, we have spent the last year writing a new Ruby parser, which we’ve called YARP (Yet Another Ruby Parser). As of the date of this post, YARP can parse a semantically equivalent syntax tree to Ruby 3.3 on every Ruby file in Shopify’s main codebase, GitHub’s main codebase, CRuby, and the 100 most popular gems downloaded from rubygems.org. We recently got approval to merge this work into C
2024-02-08 • Nikita Vasilevsky Catching Assertionless Tests In Shopify we have more than 300,000 tests in our core monolith. These tests cover most of our application code and provide us with a great level of confidence when making changes to our app. But do all tests still perform the duties they were intended to even if some of these tests were added more than 10 years ago? In this article we wi
YJIT is a JIT compiler for Ruby that Shopify has developed. In 2022, we enabled YJIT in all storefront requests and observed ~10% speedups. Do you use an app performance monitor like NewRelic or Scout, or check your daily performance graphs? Here’s how you can make sure YJIT is doing what you want when you monitor. Use what you already have We work hard to make YJIT efficient on various workloads
このページを最初にブックマークしてみませんか?
『Rails at Scale』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く