7 ms·
Anyone here who has experience working with JS/TS development tools (vscode, yarn, webpack, Node.js etc.) on a recent MacBook Air? I wonder if the performance i
by rvanmil 7y ago
Anyone here who has experience working with JS/TS development tools (vscode, yarn, webpack, Node.js etc.) on a recent MacBook Air? I wonder if the performance is noticeably worse than a 13” MacBook Pro for this type of work.
- technotarek 7y agoUp until late 2018, my MBA 2013 was doing ok with a stack transitioning to full js/ts. Now it’s close to unusable as our projects build multiple containers, load hundreds of node packages etc. Unfortunately, the 2019 MBA isn’t much better. I’m still wondering whether to hold until a new MBP 13/14”, or give this a try.
- ehutch79 7y agoA typical JS developer is not building/rebuilding docker containers constantly.
- kasey_junk 7y agoIt seems pretty typical for js backend systems to be heavily containerized such that I’d say it’s approaching the default deployment mechanism.
- ehutch79 7y agoWhy would you keep rebuilding the container constantly though?
- kasey_junk 7y agoTypically build flows don’t mount the js with volumes they embed it in the image. I’m not cognizant enough of the trade offs to know why.
- bpicolo 7y agoOptimizing your local workflows is worth the effort at every team size. I think the attempts to make local workflows mirror production 1:1 (local k8s, for example) are misguided. They miss too hard on the productivity story. Especially once you start having to swap out local debugging for remote debugging (which only a handful of languages support effectively). This is the biggest miss for many companies striving for microservice architecture. The local development story is terrible, and it stays terrible, without a lot of opinionated decisions around what your dev workflow needs to look like past the ~3-5 services mark. At a past gig I had to change 5 different repositories (5 separate PRs, all needing approval) to send an email. In a rails app that would have been a trivial task.
- inapis 7y ago> At a past gig I had to change 5 different repositories (5 separate PRs, all needing approval) to send an email. In a rails app that would have been a trivial task. That sounds like no thought was put in the system before development. Well thought out scopes & contracts between services should not create a situation like that. Reminds me of a commenter on HN who were rolling back changes to all microservices if one service needed a rollback. These kinds of issues are dead giveaways that devs are paying lip-service to "microservices." Also, devs need to understand that they don't need to be on microservices or on the latest fad. Use what works for the team. A 10-team of devs cannot necessarily adopt workflows of a FAANG.
- bpicolo 7y agoHere's the complexity story, if you're curious. 1. Terraform repo for AWS deploy 2. Step functions application logic (server-side polling daemon) 3. Email service template 4. Feature flag configuration 5. (Something in the monolith to trigger the workflow, probably?) This wasn't an entirely small engineering org - 300-400+ devs? I agree, though, is the point. I think folk don't put enough thought into the development story when going this route. I think monorepos are the only sensible way to go about it once folk have cross-service work to accomplish, and monoliths are a _good_ way to build applications for longer than folk give them credit. That said, some monoliths are more productive than others. Slow startup/compilation can destroy productivity.
- ehutch79 7y agokasey: For deployment that makes sense, but for development, that seems like a lot of work to be happening. If you change a small bit of css, the whole container is rebuilt? That seems super inefficient to me? My backends arn't JS, but I still couldn't imagine rebuilding a container everytime I changed a piece of code. Right now I change a file, django picks up the change and reloads. No noticeable delay.
- nikanj 7y agoBecause JS. And somehow we the developers convinced each other that -any- attention to performance whatsoever is "premature optimization".
- inapis 7y agoThis has got nothing to do with JS. Plenty of devs (me included) work on frontend and backend JS without containers and everything is instant for us. OP has a special use case or build pipeline necessitating such complexity.
- solat 7y agoNot really but when you try new config/Dockerfiles/docker-compose setups it's nice to have power + bandwidth. Thus, I develop on a remote server.
- technotarek 7y agoThat's correct. Not building/re-building the containers constantly. However, the initial build takes forever and some containers tend to crash (e.g., Prisma). Plus, in our case where we're using Angular, the recompiling of the app on change sends the fan into overdrive and I get noticeable lag on application switching. Again, this is on a 2013 MBA, which is almost ridiculous, but I'm that type of person. Still proudly sporting my iPhone SE. My development partner is on the 2019 MBA and has noticed improvement, but albeit rather underwhelming. As an aside, I haven't taken the time to pin point the exact problem, but as much I prefer to use Firefox, it doesn't seem to do a great job of managing resources for the SPAs we're building.
- ricketycricket 7y agoMake sure your node_modules directory is mapped to a local volume inside docker (not synced to your Mac). This dramatically improves build performance in Docker for Mac. If using docker compose, try this out https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder/38601156#38601156 https://stackoverflow.com/questions/29181032/add-a-volume-to...
- ehutch79 7y agoThis is a dumb question, but you're talking about using docker, right? Doesn't docker spin up an entire vm for containers? That does seem pretty heavy for a MBA of any generation?
- hobofan 7y ago> Doesn't docker spin up an entire vm for containers? (It generally does not. Instead it uses more lightweight isolation primtives. That has always been one of its main selling points.) EDIT: see reply > That does seem pretty heavy for a MBA of any generation? It very much depends on what you are running inside the containers. I regularly have a dev environment with ~8 relatively lightweight containers running on my Early 2014 MBA without any problems.
- mikewhy 7y ago
- twsted 7y agoIt's perfect from a performance point of view. I own the last generation (so no scissor keyboard) and I work the whole day in VSCode with JS/TS, Python, Go, Rust, etc.
- christiansakai 7y agohow's your Rust compile time in this?
- shirshak55 7y agoi don't know how is he able to compile rust. I have 2 core MBP 13inch 2017 macbook pro. Rust compilation takes like 15 seconds for small changes in actix project. For amethyst game library i wouldn't even try.
- twsted 7y agoYeah.. given my age, perhaps I'm quite relaxed about compilation times...
- bluedino 7y agoThe current 13" Pro is a beast compared to the Air. It's as fast as the older 15" Pro, while the Air is a bit slower than the current 13" Pro.
- abrowne 7y agoKeep in mind the MBP 13 with 4 ports has a 28 W chip, while the one with 2 ports has a 15 W chip (IIRC).
- solat 7y agoWhile this MBA turned out really well, current Windows featuring WSL2 is quite impressive though. Having a full Ubuntu or Debian on your machine is priceless. Or you develop on a remote server, then you just need a good terminal. So currently both macOS and Windows are good for JS dev. It's a matter of taste and price.
- snemvalts 7y agoi think most people prefer to not sell their souls for advertising when it comes to their desktop environments.
- api 7y agoYeah, the presence of ads on anything I've paid for instantly classifies it as "junk." Windows is now junk.
- kaibee 7y agohttps://github.com/Open-Shell/Open-Shell-Menu https://github.com/Open-Shell/Open-Shell-Menu
- abacadaba 7y agoShame, really. Not even a viable option for personal use.
- FpUser 7y agoI am curious where do you people see ads. I do not have any on my windows computers. All hold latest official updates.
- api 7y agoLast fresh Windows install I did came pre-loaded with a bunch of loot box style gaming crap, Candy Crush, Xbox stuff, Netflix, Amazon Prime, loads of other foistware that should not exist on a fresh install. A new Windows install requires at least an hour of de-cluttering and shit removal, while for a new Mac full setup to my liking takes about 5-10 minutes and I generally don't have to uninstall much of anything. The only thing I sometimes remove are apps I never personally use like Garage Band to save a bit of disk space, and that takes like ten seconds. Then there's the almost Android level of obviously spyware telemetry going on. Yes I know Apple has telemetry but I trust them quite a bit more than Microsoft both not to do anything deliberately sketchy with my data and to be competent with their security. They also do a lot less and a lot less invasive telemetry. Redirecting local search, sending file list dumps, etc. to the mothership is unforgivable unless I have explicitly opted into that kind of behavior e.g. for tech support or debugging. That's the kind of stuff I associate with borderline malware, not an OS by a supposedly reputable company that I paid for. Microsoft's recent behavior is pegging them in the low end of the market and ceding the high end of the market to Apple. Then of course there's Linux. If Apple did something barking stupid that forced me to ditch the platform that's where I'd go. I'd miss the Apple degree of trouble-free operation but at least I'd keep my privacy and security and lack of foistware.
- leetrout 7y agoYes. It’s miserable with any substantial JS project. Those extra cores should help with the new model.
- fastball 7y agoI thought NodeJS was single-threaded?
- qayxc 7y agoNodeJS is, but neither modules nor backends have to be. It's quite common to spin up a bunch of docker containers that provide databases and backends locally. This is the point at which the MBA stops being a productive environment. I'm not saying this has to be the case for every project, but if your team uses local dev environments, it's quasi standard procedure at this point.
- fastball 7y agoRight, but the GC was talking about developing JS applications on their computer, so presumably they were referring to compiling frontend JS projects, which multiple cores would not help, I think.
- leetrout 7y agoIt is but running a single threaded build process with resource contention from chrome, vs code, slack, etc etc will improve with more cores. If you are using make to call Babel or other JS build tools you can use the jobs flag to parallelize it and again the cores will help.
- davedx 7y agoI have a 2017 Macbook Pro and the main project I work on brings it to its knees. This is a front end project with a nodejs graphql server, TypeScript, eslint, VS.Code, webpack. I think actually the linting is the worst CPU drain, but all in all with the graphql server and front end tooling running at once, it makes my laptop slower than running the .NET core back end it connects to. Kind of annoying. Working with a simple create-react-app project with TypeScript is fine though.
- ehutch79 7y agoThere's something wrong with your setup &| stack. I've run a full stack locally, a build setup with a watcher, a django/gunicorn setup with file watching, mysql/redis/rabbitmq, and i barely nudge the cpu. I'm betting your if you cpu is hot constantly while developing, it's file watching that's the issue. I had to do some work to get things to use proper file system events in macos and not just polling with my legacy gulp project. try installing fsevents if it's not already?
- revscat 7y agoThere is something wrong. I’m running two separate Rails apps, MySQL, Oracle, RabbitMQ as a broker between the two apps, Redis, and both have Angular FEs that I use VSC with. Same year MBP, and my CPU load rarely reaches 5%.
- AgloeDreams 7y agoCheck your package updates! We had the SAME issue in serving the app on macOS and no issue on windows. Updating node and updating to latest packages produced a 80% cpu drop. When I had this issue I couldn't serve the project while running VS code on my Air, the lag from input was way too bad, now it's snappy.
- AgloeDreams 7y agoWebpack, very very large Angular project with over 2500 jasmine tests. I'm using a 2017 Air i5 8GB (First gen of new design, Came from a 2016 Macbook Pro 15 i7 (so other end of the spectrum) Node performance has gotten a lot better since some updates, there was a period where CPU use and performance was just bad. I think it was a webpack bug. But now things are pretty good! Runs Sketch and other graphics apps not too bad. As a comparison, It seems to be much faster at compile and test running than running the project on Chrome OS Crostini on my ChromeBook Pixel LS (higher wattage, older, i7 + 16GB ram) I imagine the Quad core in this would smoke the LS.