<div dir="ltr"><div>Is the 2m30s for dev or production? If it's dev then is `config.eager_load` true? That might be adding a lot of unnecessary overhead for local development. Sometimes older apps have this turned on for esoteric loading or reloading issues, but dealing with this has improved a lot in newer versions of Rails so it may be feasible to fix older issues now.<br></div><div><br></div><div>One rough and ready way of finding startup bottlenecks is to add this to the top of `config/boot.rb` to see what takes more than 0.5s to load, then you can fix those and ratchet down the time:</div><div><br></div><div>```</div><div>def require(file)<br> t = Time.now.to_f<br> result = super<br> total = Time.now.to_f - t<br> puts “Require #{file} took #{total} seconds” if total > 0.5<br> result<br>end</div><div>```</div><div><br></div><div>James<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Feb 6, 2025 at 2:03 PM Edmond Lepedus <<a href="mailto:ed.lepedus@googlemail.com">ed.lepedus@googlemail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey LRUG, <br>
<br>
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.<br>
<br>
Having mostly worked with other stacks, it feels excessive, but maybe my spidey-sense is warped?<br>
<br>
Please help! <br>
<br>
Thanks in advance,<br>
Ed<br>
_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br>
Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>
Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>
List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</blockquote></div>