[LRUG] Rails Application boot times?

Ju Liu liuju86 at gmail.com
Thu Feb 6 07:28:23 PST 2025


I've used stackprof <https://github.com/tmm1/stackprof> and speedscope
<https://github.com/jlfwong/speedscope> in the past with great
satisfaction. It's also a great skill to pick up for doing any sort of
performance work in any language, not just Ruby.

Some useful links:
https://dev.to/katafrakt/understanding-complex-ruby-application-with-profiling-tools-174a
https://www.shakacode.com/blog/an-introduction-to-test-suite-optimization-in-ruby

Ju

On Thu, Feb 6, 2025 at 3:17 PM Scott Matthewman via Chat <
chat at lists.lrug.org> wrote:

> It does seem large, but because large Rails apps preload everything, that
> initial load's always going to take time. The killer would be if you've got
> something in your initializers that is executing some sort of blocking code
> and holding up the initialization for some reason.
>
> If you have a APM service running on production, that might be able to
> offer some startup analysis. Locally, you could also try something like
> Bumbler (https://github.com/nevir/Bumbler) as a very high level,
> approximate, view of where your app's startup time is being spent.
>
> Unless that delay's causing you problems in production, I'd be inclined to
> focus on RSpec startup, which might be related (so could help generally).
> They could also be RSpec config-related; if your app preloads the
> `spec/support/` folder and it has a lot of configuration within, for
> example, that can cause issues.
>
> IMHO any time you spend speeding up your test suite loading time will
> massively increase your developer efficiency.
>
> Scott
> On 6 Feb 2025 at 2:00 PM +0000, Edmond Lepedus <ed.lepedus at googlemail.com>,
> wrote:
>
> Hey LRUG,
>
> Can I get a feel as to whether a 2m30s boot time for a Rails app with
> ~550,000 LOC is reasonable? Rspec startup time is also >1m.
>
> Having mostly worked with other stacks, it feels excessive, but maybe my
> spidey-sense is warped?
>
> Please help!
>
> Thanks in advance,
> Ed
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> Archives: http://lists.lrug.org/pipermail/chat-lrug.org
> Manage your subscription: http://lists.lrug.org/options.cgi/chat-lrug.org
> List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> Archives: http://lists.lrug.org/pipermail/chat-lrug.org
> Manage your subscription: http://lists.lrug.org/options.cgi/chat-lrug.org
> List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20250206/81208264/attachment.htm>


More information about the Chat mailing list