emacs 27 启动会卡

通过 brew install emacs-plus --HEAD --with-jansson --without-spacemacs-icon [email protected] --with-cocoa --with-xwidgets 安装emacs最近版本之后每次启动加载完成配置之后都会卡住一会才会出现 scratch buffer 界面,看启动时间只有不到两秒,但进入可输入状态需要七八秒的样子,二分查找,esup ,benchmark 这些都试过了,没找出具体哪个包的问题,今天用mac下的dstruss 看了下,发现load之后就会在以下地方等待,看着有点像等锁,有没有遇到同样问题的大佬?

getattrlist("/usr/local/Cellar/emacs-plus/HEAD-b39b564/Emacs.app/Contents/MacOS/Emacs\0", 0x70000A2E61B0, 0x70000A2E61C8)                = 0 0
access("/usr/local/Cellar/emacs-plus/HEAD-b39b564/Emacs.app\0", 0x4, 0x0)                = 0 0
open("/usr/local/Cellar/emacs-plus/HEAD-b39b564/Emacs.app\0", 0x0, 0x0)          = 16 0
fstat64(0x10, 0x7F8DBF695B50, 0x0)               = 0 0
csrctl(0x0, 0x70000A2E646C, 0x4)                 = 0 0
fcntl(0x10, 0x32, 0x70000A2E60E0)                = 0 0
close(0x10)              = 0 0
open("/usr/local/Cellar/emacs-plus/HEAD-b39b564/Emacs.app/Contents/Info.plist\0", 0x0, 0x0)              = 16 0
fstat64(0x10, 0x70000A2E6640, 0x0)               = 0 0
fcntl(0x10, 0x32, 0x70000A2E61E0)                = 0 0
read(0x10, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\nCopyright (C) 2008-2020 Free Software Foundation, Inc.\n\nThis file is part of GNU Emacs.\n\nGNU Emacs is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as p", 0x46AE)            = 18094 0
close(0x10)              = 0 0
access("/usr/local/Cellar/emacs-plus/HEAD-b39b564/Emacs.app/Contents/MacOS/Emacs\0", 0x4, 0x0)           = 0 0
open("/usr/local/Cellar/emacs-plus/HEAD-b39b564/Emacs.app/Contents/MacOS/Emacs\0", 0x0, 0x0)             = 16 0
fstat64(0x10, 0x7F8DBF695BF0, 0x0)               = 0 0
fcntl(0x10, 0x32, 0x70000A2E6170)                = 0 0
close(0x10)              = 0 0
open_nocancel("/usr/local/Cellar/emacs-plus/HEAD-b39b564/Emacs.app/Contents/XPCServices\0", 0x1100004, 0x0)              = -1 Err#2
getattrlist("/usr/local/Cellar/emacs-plus/HEAD-b39b564/Emacs.app/Contents/Resources\0", 0x70000A2E5D70, 0x70000A2E5D88)          = 0 0
mmap(0x0, 0x5000, 0x3, 0x1002, 0xFFFFFFFFFFFFFFFF, 0x0)          = 0x10D70A000 0
bsdthread_ctl(0x100, 0x0, 0x8703)                = 0 0
kevent_id(0x7F8DBF695190, 0x70000A2E6B80, 0x1)           = 0 0
kevent_id(0x7F8DBF695190, 0x70000A2E69E0, 0x1)           = 0 0
kevent_qos(0xFFFFFFFFFFFFFFFF, 0x70000A2E6A40, 0x1)              = 0 0
workq_kernreturn(0x4, 0x0, 0x0)          = 0 Err#-2
workq_kernreturn(0x40, 0x70000A369B80, 0x1)              = 0 Err#-2
kevent_qos(0xFFFFFFFFFFFFFFFF, 0x70000A369B80, 0x1)              = 0 0
bsdthread_ctl(0x100, 0x10FF, 0xFFFFFFFF)                 = 0 0
kevent_id(0x7F8DBF6960B0, 0x7FFEE8D25860, 0x1)           = 0 0
gettid(0x7FFEE8D257F0, 0x7FFEE8D257F4, 0x0)              = -1 Err#3
geteuid(0x0, 0x0, 0x0)           = 0 0
getegid(0x0, 0x0, 0x0)           = 0 0
gettid(0x7FFEE8D257E0, 0x7FFEE8D257E4, 0x0)              = -1 Err#3
geteuid(0x0, 0x0, 0x0)           = 0 0
getegid(0x0, 0x0, 0x0)           = 0 0
gettid(0x7FFEE8D257E0, 0x7FFEE8D257E4, 0x0)              = -1 Err#3
geteuid(0x0, 0x0, 0x0)           = 0 0
getegid(0x0, 0x0, 0x0)           = 0 0
gettid(0x7FFEE8D25810, 0x7FFEE8D25814, 0x0)              = -1 Err#3
geteuid(0x0, 0x0, 0x0)           = 0 0
getegid(0x0, 0x0, 0x0)           = 0 0
gettid(0x7FFEE8D257F0, 0x7FFEE8D257F4, 0x0)              = -1 Err#3
geteuid(0x0, 0x0, 0x0)           = 0 0
getegid(0x0, 0x0, 0x0)           = 0 0
gettid(0x7FFEE8D257F0, 0x7FFEE8D257F4, 0x0)              = -1 Err#3
geteuid(0x0, 0x0, 0x0)           = 0 0
getegid(0x0, 0x0, 0x0)           = 0 0
kevent_id(0x7F8DBF72B920, 0x7FFEE8D257B0, 0x1)           = 0 0
kevent_id(0x7F8DBF6960B0, 0x7FFEE8D24AD0, 0x1)           = 0 0
kevent_id(0x7F8DBF6960B0, 0x7FFEE8D24B30, 0x1)           = 0 0
workq_kernreturn(0x40, 0x70000A369B80, 0x0)              = 0 Err#-2
bsdthread_ctl(0x100, 0x8FF, 0xFFFFFFFF)          = 0 0
kevent_id(0x7F8DBF6960B0, 0x70000A369B80, 0x2)           = 1 0
bsdthread_ctl(0x100, 0x10FF, 0xFFFFFFFF)                 = 0 0
bsdthread_ctl(0x100, 0x0, 0x8703)                = 0 0
bsdthread_ctl(0x100, 0x0, 0x0)           = 0 0
mmap(0x0, 0x2000, 0x3, 0x1002, 0x34000000, 0x0)          = 0x10D70A000 0
getentropy(0x7FFEE8D1BC00, 0x20, 0x0)            = 0 0
getentropy(0x7FFEE8D1BC60, 0x40, 0x0)            = 0 0
mmap(0x0, 0x1E000, 0x3, 0x1002, 0x4C000000, 0x0)                 = 0x10E1BE000 0
madvise(0x10E1BE000, 0x1E000, 0x3)               = 0 0
workq_kernreturn(0x100, 0x70000A369B80, 0x1)             = 0 Err#-2
workq_kernreturn(0x20, 0x0, 0x2)                 = 0 0
thread_selfid(0x0, 0x0, 0x0)             = 12204264 0
madvise(0x10EA5F000, 0x18C000, 0x9)              = 0 0
madvise(0x10ED97000, 0x20000, 0x9)               = 0 0
ulock_wait(0x1050002, 0x10757B980, 0x4906)               = 0 0
ulock_wake(0x1000002, 0x10757B980, 0x0)          = -2 0
madvise(0x10EDB7000, 0x18C000, 0x9)              = 0 0
madvise(0x10EF7A000, 0x20000, 0x9)               = 0 0
madvise(0x10EA5F000, 0x18C000, 0x9)              = 0 0
madvise(0x10EA5F000, 0x18C000, 0x7)              = 0 0
madvise(0x10EBEB000, 0x20000, 0x9)               = 0 0
mmap(0x0, 0x2000, 0x3, 0x1002, 0x34000000, 0x0)          = 0x10D70C000 0
mmap(0x0, 0x2000, 0x3, 0x1002, 0x34000000, 0x0)          = 0x10D70E000 0
mmap(0x0, 0x6000, 0x3, 0x1002, 0x33000000, 0x0)          = 0x10D714000 0
mmap(0x0, 0x21000, 0x3, 0x1002, 0x4C000000, 0x0)                 = 0x10E1DC000 0
madvise(0x10E1DC000, 0x21000, 0x3)               = 0 0
workq_kernreturn(0x4, 0x0, 0x0)          = 0 Err#-2
workq_kernreturn(0x4, 0x0, 0x0)          = 0 Err#-2
workq_kernreturn(0x20, 0x0, 0x3)                 = 0 0
thread_selfid(0x0, 0x0, 0x0)             = 12204265 0
madvise(0x10EA5F000, 0x18C000, 0x9)              = 0 0
ulock_wait(0x1050002, 0x10757B980, 0x13F06)              = 0 0
ulock_wake(0x1000002, 0x10757B980, 0x0)          = -2 0
madvise(0x10EDB7000, 0x18C000, 0x9)              = 0 0
ulock_wait(0x1050002, 0x10757B980, 0x4906)               = 0 0
ulock_wait(0x1050002, 0x10757B980, 0x4906)               = 0 0
ulock_wake(0x1000002, 0x10757B980, 0x0)          = -2 0
ulock_wait(0x1050002, 0x10757B980, 0x13F06)              = 0 0
ulock_wake(0x1000002, 0x10757B980, 0x0)          = -2 0
madvise(0x10EF7A000, 0x20000, 0x9)               = 0 0
ulock_wait(0x1050002, 0x10757B980, 0x4906)               = 0 0
ulock_wait(0x1050002, 0x10757B980, 0x4906)               = 0 0
ulock_wake(0x1000002, 0x10757B980, 0x0)          = -2 0
madvise(0x10EC0B000, 0x18C000, 0x9)              = 0 0
ulock_wait(0x1050002, 0x10757B980, 0x13E02)              = 0 0
ulock_wait(0x1050002, 0x10757B980, 0x13E02)              = 0 0
ulock_wake(0x1000002, 0x10757B980, 0x0)          = -2 0
madvise(0x10EBEB000, 0x20000, 0x9)               = 0 0
ulock_wait(0x1050002, 0x10757B980, 0x13F06)              = 0 0
ulock_wake(0x1000002, 0x10757B980, 0x0)          = -2 0
madvise(0x10EDB7000, 0x18C000, 0x9)              = 0 0
madvise(0x10EBEB000, 0x20000, 0x9)               = 0 0
madvise(0x10EC0B000, 0x18C000, 0x7)              = 0 0
madvise(0x10ED97000, 0x20000, 0x9)               = 0 0
ulock_wake(0x1000001, 0x109A014E8, 0x0)          = 0 0
ulock_wait(0x1000001, 0x109A014E8, 0xFFFFFFFF)           = 0 0
ulock_wake(0x1000002, 0x108061400, 0x0)          = -2 0
ulock_wait(0x1050002, 0x108061400, 0x306)                = 0 0
ulock_wake(0x1000002, 0x108061400, 0x0)          = -2 0
ulock_wait(0x1050002, 0x108061400, 0x306)                = 0 0
kevent_id(0x7F8DBF695190, 0x70000A2E6B80, 0x1)           = 0 0
kevent_id(0x7F8DBF59B890, 0x7FFEE8D1E770, 0x1)           = 0 0
workq_kernreturn(0x4, 0x0, 0x0)          = 0 Err#-2
kevent_id(0x7F8DBF5A3690, 0x7FFEE8D1E9B0, 0x1)           = 0 0
workq_kernreturn(0x4, 0x0, 0x0)          = 0 Err#-2
bsdthread_ctl(0x100, 0x0, 0x4C0F)                = 0 0
psynch_mutexdrop(0x7F8DBF4AD040, 0x300, 0x300)           = 0 0
psynch_mutexwait(0x7F8DBF4AD040, 0x302, 0x200)           = 771 0
bsdthread_ctl(0x100, 0x0, 0x0)           = 0 0
__mac_syscall(0x7FFF63AB1D94, 0xB4, 0x7FFEE8D25CF8)              = 0 0
bsdthread_ctl(0x100, 0x0, 0x0)           = 0 0
kevent_id(0x7F8DBF5A3690, 0x7FFEE8D1F810, 0x1)           = 0 0
workq_kernreturn(0x4, 0x0, 0x0)          = 0 Err#-2
kevent_id(0x7F8DBF5A3690, 0x7FFEE8D1F810, 0x1)           = 0 0
workq_kernreturn(0x100, 0x70000A3ECB80, 0x1)             = 0 Err#-2
kevent_id(0x7F8DBF5A3690, 0x7FFEE8D1F810, 0x1)           = 0 0
workq_kernreturn(0x100, 0x70000A3ECB80, 0x1)             = 0 Err#-2
__pthread_sigmask(0x1, 0x7FFEE8D28720, 0x7FFEE8D28724)           = 0 0
setitimer(0x0, 0x7FFEE8D286E0, 0x0)              = 0 0
__pthread_sigmask(0x3, 0x7FFEE8D28724, 0x0)              = 0 0
bsdthread_ctl(0x100, 0x0, 0x1460B)               = 0 0
__mac_syscall(0x7FFF63AB1D94, 0xB4, 0x7FFEE8D24C88)              = 0 0
bsdthread_ctl(0x100, 0x0, 0x0)           = 0 0
kevent_id(0x7F8DBF5A3690, 0x7FFEE8D1F810, 0x1)           = 0 0
workq_kernreturn(0x100, 0x70000A3ECB80, 0x1)             = 0 Err#-2
__pthread_sigmask(0x1, 0x7FFEE8D28720, 0x7FFEE8D28724)           = 0 0
setitimer(0x0, 0x7FFEE8D286E0, 0x0)              = 0 0
__pthread_sigmask(0x3, 0x7FFEE8D28724, 0x0)              = 0 0
workq_kernreturn(0x100, 0x70000A3ECB80, 0x1)             = 0 Err#-2
^C
bsdthread_ctl(0x100, 0x0, 0x8703)                = 0 0
bsdthread_ctl(0x100, 0x0, 0x0)           = 0 0
sigreturn(0x7FFEE8D286C8, 0x1E, 0x6B168CD8048F4388)              = 0 Err#-2

难道只有我觉得 Emacs 27 的启动速度远快于 26 吗? 运行 daemon 的时候,瞬间就完成,以前 26 像老牛一样。

1 个赞

用了general,在27版本会导致启动很慢,现在把所有的keybind 延迟加载就好了,26.3是好的

我的 27、28 启动很快啊

因为你没有用general 这个包来绑定快捷键