<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8">Hi,<br><br><div dir="ltr"><blockquote type="cite">On 23 May 2023, at 17:35, Ed James <ed.james.spam@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div>We now have a build which consistently fails when compiling assets because of a RAM overflow i.e. we are suddenly exceeding our CircleCI RAM limit, which is 16GB!</div><div><br></div></div></blockquote><div><br></div><div>Does your assets have any js (or ts) .erb files? An app I used to work on had quite a lot of these (we used them to interpolate settings, I18n etc into the front end). Webpacker has to spawn a rails process for those and it will spawn many in parallel if you have lots of these files. Other than that the way we really got our asset compilation under control was switching to esbuild (via jsbundling). As Martin notes you can’t do some of the cleverer stuff this way (HMR, some of the dynamic chunking I think) but if you’re not very front end focussed you probably weren’t using them anyway!</div><br><blockquote type="cite"><div dir="ltr"><div>We’ve run out of experiments and seems to have exhausted all avenues for fixing this. We are primarily a back-end team so we have no specialist webpacker/asset-pipeline knowledge in the team.</div><div><br></div><div>If anyone is willing to have a brief chat to run through any other potential gotchas/options, I would greatly appreciate it.</div><div><br></div><div>I did find this article particularly interesting, but our lack of asset-pipeline knowledge limit us from progressing down this route (which seems promising): <a href="https://rossta.net/blog/overpacking-a-common-webpacker-mistake.html">https://rossta.net/blog/overpacking-a-common-webpacker-mistake.html</a></div></div></blockquote><div dir="ltr"><br></div><div dir="ltr">Yes, this is easy enough to do by accident. The short version is that if all (or lots of your js) is in app/JavaScript/packs you’re probably guilty of that. The file(s) in there should be few and mostly just importing all of your code and bootstrapping your frontend code.</div><div dir="ltr"><br></div><div dir="ltr">Not a frontend expert by any stretch of the imagination but happy to have a chat.</div><div dir="ltr"><br></div><div dir="ltr">Fred</div><br><blockquote type="cite"><div dir="ltr"><div><br></div><div>Thanks!<br><div>
<br>
<hr style="display: block; height: 1px; border: 0; border-top: 1px dotted #ccc; margin: 5px 0; padding: 0;">
<br>
<table border="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td valign="top" width="70">
<img height="60" src="http://ej-public.s3.amazonaws.com/images/rubbish.png" style="margin: 8px 8px 0 0;" data-unique-identifier="">
</td>
<td style="font-family:'Lucida Grande',sans-serif">
<span style="font-weight:bold; color: #333333; font-size: 18px; line-height:30px;">Ed James</span>
<br>
<span style="font-weight:normal; color: #999; font-size: 12px; line-height:16px;">
<a href="mailto:ed.james.spam@gmail.com" style="color:#999; text-decoration:none" target="_blank">I will respect your spam</a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
<br></div><span>_______________________________________________</span><br><span>Chat mailing list</span><br><span>Chat@lists.lrug.org</span><br><span>Archives: http://lists.lrug.org/pipermail/chat-lrug.org</span><br><span>Manage your subscription: http://lists.lrug.org/options.cgi/chat-lrug.org</span><br><span>List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org</span><br></div></blockquote></div></div></div></body></html>