OvermindDL1
Dev Memory Usage
Ahh, I have here my big Phoenix project at work currently running in dev mode, eating up a measly 143 megs while it is hosting a few dozen websocket connections and database work and such.
And side-by-side to it is node, eating a wtf 305megs just to compile assets…
Only thing higher than Phoenix’s node in memory right now is dwm.exe (because windows sucks) and chrome.exe (because I have OGodHowManyTabs open right now).
/me sighs
Still low, but just surprising it is that high compared to a full-out erlang server that is actually doing a lot of stuff is quite a bit smaller. ![]()
If only there were a way to toss out node for handling all the front-end assets. ^.^
Most Liked Responses
PragTob
The Phoenix philosophy for asset management is, just use npm/node - we have brunch as a default but it is easily replaceable by whatever. So I also think it’s not going to come.
I like this very much. We don’t have to reinvent the wheel every time around and cook something new up. Most node/npm tooling is far more advanced than in other language which is also why people on frameworks with asset management (like rails) constantly look for ways to integrate, for instance, webpack with it - which is a pain (or at least it was for both Rails and JS experts at my former company).
I love the flexibility and pragmatism of Phoenix here.
josevalim
One the things we were very careful with when designing the integration with brunch is to make sure all the code is in the generated application. The only line of code in your Phoenix project that knows about brunch is a single line in your config/dev.exs that starts the watcher. Phoenix itself knows nothing. This means we can replace Brunch by something else in future versions without breaking any existing application.
OvermindDL1
Very! Re-creating the javascript asset pipeline would be beyond painful and not work with everything very well. Using node is the right way, regardless of how heavy node is. ^.^
EDIT: My main complaint with the node stuff is the 50-thousand asset pipelines that do not interoperate (Brunch, Webpack, Gulp, Grunt, JSPM, Bower, NPM, etc… etc.. etc.) and where certain libraries will only work with certain things (I have 4 of the above things in my big project right now because of javascript ecosystem utter-stupidity). I do not care ‘what’ is chosen, but there needs to be only one thing chosen…








