reddit / emacs

DOOMEMACS 0.7s startup (with nothing extra added to the default config) on MacOS (M1 PRO)? Why so slow? Its 0.5 on my hardware wise worse linux machine?

HappyLoquat666 · 2022-03-07 21:02
Why is that? How can I improve the performance? (I know its not that bad, but once the computer slows down, the startup time will worsen too.) So for the sake of not having 3s startup time a few years down the road, what can I do? Should I install a different version of emacs? Thanks ​ Btw, I am currently using emacs-plus@27, I think.
TheFrenchPoulp · 2022-03-07 21:16
Sounds like you could have saved those 3s by not posting this... In all seriousness though, and assuming no native compilation, such a small delta could be explained by too many things including softwares running on the side in your 2 setups. If you have more than 3s to spare, you could try the latest that emacs-plus provide (29 at the time of writing) Feel free to post Doom-related support queries in the more relevant mediums
ZiletoOnReddit · 2022-03-07 21:31
Sorry if the question seems unnecessary, but im also genuinely interested about tbe startup performance difference. Could it be becuase of the emacs verison im using? Is emacs-mac better? Seems like I'm having similar problems as OP
TheFrenchPoulp · 2022-03-07 21:58
I wouldn't know for sure, I haven't benchmarked the recent major versions myself. I suppose it could I've always used emacs-plus with no issue. The main difference between my Linux and macOS setups usually comes from `exec-path-from-shell` if you too are using that
AuroraDraco · 2022-03-07 21:59
Laughs in 11s startup time. Honestly why does it even matter. Assuming you use daemon mode (which you should, especially seeing as you care about startup time) you only have to wait that time once. So yeah, losing 0.5s every time you boot into your computer isn't a big deal
TheFrenchPoulp · 2022-03-07 22:12
FWIW startup time has little to do with whether one should/ought to use the daemon
jmite · 2022-03-07 22:15
Are you using an ARM build or is it running through Rosetta? What's the specs on the Linux machine? Have you profiled? What are the versions of Emacs on each machine?
AuroraDraco · 2022-03-07 22:41
I mean, the way I see it, if you are so concerned about startup time, then use the daemon to only wait it out once
venustrapsflies · 2022-03-07 22:51
You can also run it as a service via systemctl so that it just gets absorbed in your computer’s overall startup time, when you’ll probably be waiting anyway.
TheFrenchPoulp · 2022-03-07 23:06
I'd rather wait not even once personally. I don't use the daemon because this is more than 0 complication and might require a different setup on different machines. In addition, this is not how I'd like to fix a slow startup time. In some periods I do restart Emacs many times a day on purpose ie. when I work on my configuration mostly. The rest of the time, waiting .4s is manageable
mtndewforbreakfast · 2022-03-07 23:13
There's no reason an Emacs user with a Doom-based config should feel unwelcome to ask questions or share about their Emacs experience here on an Emacs subreddit. That last sentence was uncalled for.
Null-A · 2022-03-07 23:48
>github.com/Chande... maybe checkout emacs-mac with metal + gcc, i notice slightly better performance but can't speak to start-up. also what happens if you launch from a ramdisk?
TheFrenchPoulp · 2022-03-08 00:23
I don't use Doom myself and it's a little annoying that I can't properly filter these support requests out of my feed. Generally speaking, they lack the relevant details and assume everyone is using Doom in the first place. Here OP complains about loading speed but we have no idea about how many packages their configuration is (defer-)loading, whether that includes native compilation, etc. Nothing (too) wrong about the post itself, I didn't report it and I won't, it *is* Emacs-related. But it is directed at Doom users, and even I know there's /r/doomemacs as well as a very good Discord server Thanks for that last comment I hadn't realized it might sound unfriendly, written mediums do feel that way sometimes
organic-bookworm · 2022-03-08 08:21
[Doom doesn't support Emacs 29 yet.](https://github.com/hlissner/doom-emacs#prerequisites)
HappyLoquat666 · 2022-03-09 12:37
ARM build. M1 pro chip, 16 gb ram. Emacs-plus@27 on mac, Emacs@27 on linux.
jmite · 2022-03-11 17:25
Yeah, different architecture, different OS, different build of Emacs. I think there's enough variance there to explain 0.2s difference without worrying that something is slowing down your performance. Possible explanations: * It's literally a different chip with different instructions. It will optimize differently, manage its pipeline differently * MacOS will have different system calls, different background processes, etc. It's probably doing a lot more in the background. Are you sure that the difference is all being spent in the emacs process? * Emacs-plus might be using different build options than normal emacs There's literally no way to know what the cause is without profiling.