News for hackers. Stuff that matters.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by yeldarb on Thursday November 04, 2021 @11:40PM (#29115193)
Mine just arrived today and I'm blown away.

After upgrading our app's dependency chain to run native arm64 builds (which took a bit of googling) webpack's incremental build time on our app is down to 116ms from 983ms on my 2016 Macbook Pro. Over 8x faster.

Our Tensorflow.js (webgl) models that previously ran about 8fps in the browser are now running at the camera's native 30fps framerate. (Similar to my desktop 2080ti.)

Re:M1 Pro First Impressions: Core Management and CPU Perform... by lordnacho on Friday November 05, 2021 @02:07AM (#29115975)
Got mine last week and not only is it faster, the power usage is crazy good. I took it to town for the first time yesterday, thought I'd do some coding between meetings for a few hours. Battery is still over 90%. I actually don't know what the thing sounds like with fans on, because it hasn't happened yet. My old machine from 2019 would have been down to half power at least, and the fans used to come on with just two monitors plugged in and not much workload.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by iknowstuff on Friday November 05, 2021 @02:37AM (#29116101)
I think I'm missing out as mine drops by a very pedestrian 10% an hour. WindowServer keeps using a cool 4% of the CPU at all times, even when nothing is running.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by spacelamb on Friday November 05, 2021 @10:14AM (#29119548)
I had it even worse only 5 hours of battery life in my first week of usage. It turned out OneDrive had a bug with syncing; after reinstalling (then keeping it on overnight for the sync to finish), the battery jumped to ~8-10 hours with fairly heavy usage (Parallels + Safari, though with syncing paused), which is near your current level. The Energy tab of the Activity Monitor helped me identify OneDrive as the power suck.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by GhettoComputers on Friday November 05, 2021 @05:36AM (#29117099)
The task manager (called activity monitor) has a power usage section. It might be syncing or if you had Firefox on it uses way more than safari.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by saagarjha on Friday November 05, 2021 @08:10AM (#29118085)
How are you measuring CPU usage? Presumably whatever monitoring tool you're looking at needs to redraw itself, and that's going to bring in WindowServer…

(FWIW, my WindowServer usage is generally around 3-8% when idling and I am losing about 6% an hour at the moment.)

Re:M1 Pro First Impressions: Core Management and CPU Perform... by grumpyprole on Friday November 05, 2021 @02:56AM (#29116169)
Perhaps you have some rogue process that is causing windows server to run at 4%?
Re:M1 Pro First Impressions: Core Management and CPU Perform... by mmargerum on Friday November 05, 2021 @06:00AM (#29117248)
Visual studio code haha
Re:M1 Pro First Impressions: Core Management and CPU Perform... by harshitaneja on Friday November 05, 2021 @09:41AM (#29119071)
I am not 2021 macbook pro's yet but on 2020 M1 VS Code doesn't have higher than usual impact on battery. Atleast I, with 7-8 active vscode windows throughout the day, couldn't notice.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by merrywhether on Friday November 05, 2021 @06:06AM (#29117273)
Any chance you have Dropbox running? They are very slow to native M1 support and otherwise their app manages to really kill battery life.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by vmception on Friday November 05, 2021 @08:08AM (#29118069)
I’m actually debating if I even want to do a backup and restore because of this. I don’t want my chimera of an environment.

I think I want to just use this machine fresh and just move a few files over as needed.

Re:M1 Pro First Impressions: Core Management and CPU Perform... by jb1991 on Friday November 05, 2021 @08:10AM (#29118091)
Any background process running through Rosetta, like dropbox, or maybe your Windows server, will eat up tons of battery if they’re not running native.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by codeisawesome on Friday November 05, 2021 @07:32AM (#29117792)
I’ve wondered for a while if the fans coming on due to dual monitors is a software / driver issue that could be fixed by a patch. It would save me from buying a new machine right now.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by zuhsetaqi on Friday November 05, 2021 @07:57AM (#29117980)
It’s because as soon as you plug in an external monitor, the dedicated GPU is used for the output and is responsible for the added heat
Re:M1 Pro First Impressions: Core Management and CPU Perform... by sudhirj on Friday November 05, 2021 @08:24AM (#29118197)
That part isn't a bug, though. It needs the dedicated GPU to push all those pixels, the native screen is already pretty dense.

There was a bug where something would infinite loop on a non-standard resolution, think that was fixed.

Re:M1 Pro First Impressions: Core Management and CPU Perform... by throwntoday on Friday November 05, 2021 @05:02AM (#29116922)
Same here, spent two hours programming on the train and it went down by about two percent.

So glad I went with the spec I did, all the power I need with room to grow.

Re:M1 Pro First Impressions: Core Management and CPU Perform... by capableweb on Friday November 05, 2021 @04:02AM (#29116541)
Rather than switching hardware, you can also switch out the software to more efficient one. esbuild would make your builds go sub-ms even without needing a M1 CPU, also worth a try if you cannot switch to the newest hardware, so I guess this comment is for poor people.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by pistoriusp on Friday November 05, 2021 @06:00AM (#29117243)
Why not both? I can honestly say that I didn't know how bad the 2019 MBP Intel CPUs are until I tried a M1. It's streets ahead.

I don't think people will be moving away from webpack for awhile, but transpilation is often a very expensive part, and `swc` is very near to stable, and as a transpiler / polyfilling tool it's pretty fast.

Re:M1 Pro First Impressions: Core Management and CPU Perform... by DJHenk on Friday November 05, 2021 @06:36AM (#29117442)
> Why not both?

Because buying new stuff is wasteful and only a temporary solution to the problem?

Look, I like nice, fast machine as much as the rest of the crowd here, but let's not kid ourselves. In a years time the software we run on it will have become even more bloated and things will be just as slow as they were. And then a new machine comes out we all want to buy that.

There will be some ecstatic blog posts again. Which is weird, I think. Needing a faster machine for you daily work should feel like defeat for a developer.

If you need a new laptop and can afford it, by all means go ahead and indulge. In the mean time, I am typing this from a 7 year old Latitude that I use every day for software development and that shows no sign of aging, apart from some scratches. And each time I read a post like this I wonder: what do these people _do_ with these machines?

Re:M1 Pro First Impressions: Core Management and CPU Perform... by jmnicolas on Friday November 05, 2021 @06:58AM (#29117591)
> And each time I read a post like this I wonder: what do these people _do_ with these machines?

To give you an idea, I don't have Macs, but I have a beefy desktop because I run my own OpenStreetMap server on it.

My old machine: i7 3770, 32GB ram, 1 TB sata SSD: 3 days to import Europe's map. The new one: Ryzen 5800, 32GB ram, 1 TB NVME: 10 hours to import Europe's map.

I will probably need to upgrade my ram and NVME capacity if I want to build a world map.

Re:M1 Pro First Impressions: Core Management and CPU Perform... by tpxl on Friday November 05, 2021 @09:16AM (#29118756)
> because I run my own OpenStreetMap server on it.

What do you do with it?

Re:M1 Pro First Impressions: Core Management and CPU Perform... by liotier on Friday November 05, 2021 @09:55AM (#29119262)
Generate map tiles, throw lots of queries at a local Overpass API, run custom large-scale analysis, develop a geocoding service, serve routing calculations... Many applications that public servers will let one query at sample scales, but for which serious use requires setting up one's own servers.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by jmnicolas on Friday November 05, 2021 @10:36AM (#29119873)
I'm mainly generating map tiles for offline use. I don't want to hit OSM official servers, this is too intensive (and they would probably block me).
Re:M1 Pro First Impressions: Core Management and CPU Perform... by dylan604 on Friday November 05, 2021 @10:06AM (#29119423)
Whatever they want. It's theirs.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by mixmixmix on Friday November 05, 2021 @09:39AM (#29119044)
Cool.

Enjoy your latitude, but you don’t have the right to tell me that I can’t enjoy my M1 max.

Different strokes for different folks.

Re:M1 Pro First Impressions: Core Management and CPU Perform... by Lukas_Skywalker on Friday November 05, 2021 @08:35AM (#29118291)
I am still on an i5 11" MacBook Air made of aluminum from Mid 2012 with 4GB RAM. Changed the battery twice, upgraded to a larger SSD once. I was considering buying a new laptop a few years ago, but that thing has served me so well despite falling to the ground unprotected about 3 times and being old. I do embedded and some web programming. I will use it until I am no longer able to start it up. And at that point, I will probably open it up and have a very last try at fixing it.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by de_keyboard on Friday November 05, 2021 @11:31AM (#29120713)
If you're not streets ahead then you're streets behind.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by tdy_err on Friday November 05, 2021 @04:18AM (#29116662)
Unfortunately, ESbuild is not a drop-in replacement for Webpack either. So, the poor but lucky enough to rely on any plug-ins.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by atdrummond on Friday November 05, 2021 @07:39AM (#29117840)
Wouldn’t you need to change your entire build processes if you followed this route? I don’t do a lot of this type of dev but my understanding is esbuild wouldn't handle polyfill, for example.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by matthewmacleod on Friday November 05, 2021 @04:51AM (#29116849)
esbuild is not simply “more efficient webpack” so that’s quite misleading.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by capableweb on Friday November 05, 2021 @05:13AM (#29116975)
Good thing I never said esbuild is "simply" "more efficient webpack". Parent was talking about build times, probably bulk of that is spent building JS, which you can plug in esbuild to handle instead.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by pistoriusp on Friday November 05, 2021 @06:01AM (#29117252)
ESBuild doesn't polyfill, so it's _really_ not a decent replacement, unless you want to keep track of which JS object features are available in which targets and import those manually yourself?
Re:M1 Pro First Impressions: Core Management and CPU Perform... by PikachuEXE on Friday November 05, 2021 @02:16AM (#29116017)
> After upgrading our app's dependency chain to run native arm64 builds

Would you mind sharing your research results?

I am getting one soon and I am in progress of drafting notes for stuff like migration & setup.

Re:M1 Pro First Impressions: Core Management and CPU Perform... by yeldarb on Friday November 05, 2021 @08:17AM (#29118141)
It was mostly stuff specific to our specific situation.

We were still on node 12 because, until recently, Google Cloud Functions didn’t support anything newer. But when I installed it, I noticed it was running on x86 via Rosetta. So I upgraded to the latest node (17) which installed as native arm64.

Almost everything “just worked” but there were build errors with installing: webpack, node-sass, gprc, and node-canvas.

Webpack turned out to be an issue with node current (17) so downgrading to lts (which is currently 16) worked.

That seems to have magically fixed the gprc build too.

We weren't actually using node-sass anymore; so removed that dependency.

Upgrading node-canvas to 2.8.0 and building from source (after installing its dependencies via homebrew) seems to have worked.

All in all it took maybe 2 hours to follow all the rabbit holes. And our whole engineering team is going to move over to arm64 as soon as Apple can deliver their machines.

Re:M1 Pro First Impressions: Core Management and CPU Perform... by BigJ1211 on Friday November 05, 2021 @09:36AM (#29119005)
iirc node-sass was rewritten in dart and now you just need to use the package `sass` should work as a drop-in.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by SkyMarshal on Friday November 05, 2021 @03:15AM (#29116272)
I would like to see this too, it's my only hesitancy in getting one.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by Gigachad on Friday November 05, 2021 @12:31AM (#29115475)
And if its anything like my regular M1, it does that while remaining cold. I used a 2019 macbook pro and the thing would be roasting hot if you had docker running.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by saagarjha on Friday November 05, 2021 @08:11AM (#29118097)
I've gotten M1 Pro to heat up and require active cooling, unlike M1. It's certainly no space heater like my Intel Core i9 work laptop, but you can push it pretty hard.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by skavi on Friday November 05, 2021 @01:47AM (#29115882)
The regular M1 uses far less peak power than the M1 Pro/Max. They’re definitely still far more efficient than competitors though.
Re:M1 Pro First Impressions: Core Management and CPU Perform... by asdff on Friday November 05, 2021 @02:12AM (#29115998)
Can you overclock the regular m1 then?
Re:M1 Pro First Impressions: Core Management and CPU Perform... by Bishonen88 on Friday November 05, 2021 @07:27AM (#29117756)
Are there any changes to be done in webpack itself to make the build process be quicker on a M1 machine?