Skip to content

Commit be75abf

Browse files
Comamocaclaude
andcommitted
⚡ perf(emacs): Optimize startup and runtime performance
- early-init.el: Pre-disable GUI elements, maximize GC threshold during startup, suppress redisplay, temporarily disable file-name-handler-alist - Reduce flycheck check frequency to lower CPU usage - Disable nyan-mode animation, smartparens, and minimap by default - Add jit-lock and scroll optimizations - Change display-time-interval from 1s to 60s - Consolidate LSP to lsp-mode (comment out eglot) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0a90885 commit be75abf

File tree

4 files changed

+175
-87
lines changed

4 files changed

+175
-87
lines changed

_sources/generated.json

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,26 @@
2020
},
2121
"version": "ac10526c5cfcc2f4288d3539853ff23f4ee7f915"
2222
},
23+
"autoclaude": {
24+
"cargoLocks": null,
25+
"date": "2026-01-15",
26+
"extract": null,
27+
"name": "autoclaude",
28+
"passthru": null,
29+
"pinned": false,
30+
"src": {
31+
"deepClone": false,
32+
"fetchSubmodules": false,
33+
"leaveDotGit": false,
34+
"name": null,
35+
"rev": "39ad5ef1818a9c71241bea463da3af33f1dccf69",
36+
"sha256": "sha256-+EEeijp1FfHK/ScpegdTaIYfaM9JM89NizvpGh2ezFM=",
37+
"sparseCheckout": [],
38+
"type": "git",
39+
"url": "https://github.com/henryaj/autoclaude"
40+
},
41+
"version": "39ad5ef1818a9c71241bea463da3af33f1dccf69"
42+
},
2343
"claude-code": {
2444
"cargoLocks": null,
2545
"date": "2025-12-18",
@@ -127,7 +147,7 @@
127147
},
128148
"eca": {
129149
"cargoLocks": null,
130-
"date": "2026-01-21",
150+
"date": "2026-01-26",
131151
"extract": null,
132152
"name": "eca",
133153
"passthru": null,
@@ -137,13 +157,13 @@
137157
"fetchSubmodules": false,
138158
"leaveDotGit": false,
139159
"name": null,
140-
"rev": "298849d1aae3241bf8828b6558c6deb45d75a3c8",
141-
"sha256": "sha256-QpJGTDfvFzCvDmmB8YZ7xEI2d9EiDc7nJDe5k7TUEUA=",
160+
"rev": "f5ea2d098b90ac4fcb0e6ebfe71dd5524bf42d81",
161+
"sha256": "sha256-saYUW+5I2PxY5LVWSvZjoBNtSpsskTNIci9PueuQMWY=",
142162
"sparseCheckout": [],
143163
"type": "git",
144164
"url": "https://github.com/editor-code-assistant/eca-emacs"
145165
},
146-
"version": "298849d1aae3241bf8828b6558c6deb45d75a3c8"
166+
"version": "f5ea2d098b90ac4fcb0e6ebfe71dd5524bf42d81"
147167
},
148168
"eglot-booster": {
149169
"cargoLocks": null,
@@ -381,7 +401,7 @@
381401
},
382402
"python-mode": {
383403
"cargoLocks": null,
384-
"date": "2025-12-15",
404+
"date": "2026-01-31",
385405
"extract": null,
386406
"name": "python-mode",
387407
"passthru": null,
@@ -393,12 +413,12 @@
393413
"name": null,
394414
"owner": "emacsmirror",
395415
"repo": "python-mode",
396-
"rev": "02b92f2d903d357800a31903f69834ec54cda39b",
397-
"sha256": "sha256-tiR3qOFsbbbNiebaQyOB/Yn+bZ2wJGaPm6Fpt/IX+Gk=",
416+
"rev": "2a6fdb1c823bf8125f6354727db63c8894092821",
417+
"sha256": "sha256-sTnmfDF8QLc4aVI5Pqx9kqL4zqkPsopX1Sz3EJ7Ddx0=",
398418
"sparseCheckout": [],
399419
"type": "github"
400420
},
401-
"version": "02b92f2d903d357800a31903f69834ec54cda39b"
421+
"version": "2a6fdb1c823bf8125f6354727db63c8894092821"
402422
},
403423
"quickrun": {
404424
"cargoLocks": null,
@@ -522,7 +542,7 @@
522542
},
523543
"smudge": {
524544
"cargoLocks": null,
525-
"date": "2025-12-24",
545+
"date": "2026-02-02",
526546
"extract": null,
527547
"name": "smudge",
528548
"passthru": null,
@@ -534,12 +554,12 @@
534554
"name": null,
535555
"owner": "danielfm",
536556
"repo": "smudge",
537-
"rev": "dcca1b9ac15886060788df83c7da63faa5ae027f",
538-
"sha256": "sha256-pwL9S+pZFrzlg07ZHL3kBQwa6SRcc++YlEseZrwDeVo=",
557+
"rev": "c90db830e84e34ac5724f57eda2f1112a589df5c",
558+
"sha256": "sha256-ZBci8h1f0s0b9yKPXESr0iYyqejnAoWyct7NeJVCFFM=",
539559
"sparseCheckout": [],
540560
"type": "github"
541561
},
542-
"version": "dcca1b9ac15886060788df83c7da63faa5ae027f"
562+
"version": "c90db830e84e34ac5724f57eda2f1112a589df5c"
543563
},
544564
"typst-mode": {
545565
"cargoLocks": null,

_sources/generated.nix

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,20 @@
1313
};
1414
date = "2026-01-10";
1515
};
16+
autoclaude = {
17+
pname = "autoclaude";
18+
version = "39ad5ef1818a9c71241bea463da3af33f1dccf69";
19+
src = fetchgit {
20+
url = "https://github.com/henryaj/autoclaude";
21+
rev = "39ad5ef1818a9c71241bea463da3af33f1dccf69";
22+
fetchSubmodules = false;
23+
deepClone = false;
24+
leaveDotGit = false;
25+
sparseCheckout = [ ];
26+
sha256 = "sha256-+EEeijp1FfHK/ScpegdTaIYfaM9JM89NizvpGh2ezFM=";
27+
};
28+
date = "2026-01-15";
29+
};
1630
claude-code = {
1731
pname = "claude-code";
1832
version = "4a9914bd4161eb43f489820f9174c62390e5adc8";
@@ -75,17 +89,17 @@
7589
};
7690
eca = {
7791
pname = "eca";
78-
version = "298849d1aae3241bf8828b6558c6deb45d75a3c8";
92+
version = "f5ea2d098b90ac4fcb0e6ebfe71dd5524bf42d81";
7993
src = fetchgit {
8094
url = "https://github.com/editor-code-assistant/eca-emacs";
81-
rev = "298849d1aae3241bf8828b6558c6deb45d75a3c8";
95+
rev = "f5ea2d098b90ac4fcb0e6ebfe71dd5524bf42d81";
8296
fetchSubmodules = false;
8397
deepClone = false;
8498
leaveDotGit = false;
8599
sparseCheckout = [ ];
86-
sha256 = "sha256-QpJGTDfvFzCvDmmB8YZ7xEI2d9EiDc7nJDe5k7TUEUA=";
100+
sha256 = "sha256-saYUW+5I2PxY5LVWSvZjoBNtSpsskTNIci9PueuQMWY=";
87101
};
88-
date = "2026-01-21";
102+
date = "2026-01-26";
89103
};
90104
eglot-booster = {
91105
pname = "eglot-booster";
@@ -224,15 +238,15 @@
224238
};
225239
python-mode = {
226240
pname = "python-mode";
227-
version = "02b92f2d903d357800a31903f69834ec54cda39b";
241+
version = "2a6fdb1c823bf8125f6354727db63c8894092821";
228242
src = fetchFromGitHub {
229243
owner = "emacsmirror";
230244
repo = "python-mode";
231-
rev = "02b92f2d903d357800a31903f69834ec54cda39b";
245+
rev = "2a6fdb1c823bf8125f6354727db63c8894092821";
232246
fetchSubmodules = false;
233-
sha256 = "sha256-tiR3qOFsbbbNiebaQyOB/Yn+bZ2wJGaPm6Fpt/IX+Gk=";
247+
sha256 = "sha256-sTnmfDF8QLc4aVI5Pqx9kqL4zqkPsopX1Sz3EJ7Ddx0=";
234248
};
235-
date = "2025-12-15";
249+
date = "2026-01-31";
236250
};
237251
quickrun = {
238252
pname = "quickrun";
@@ -305,15 +319,15 @@
305319
};
306320
smudge = {
307321
pname = "smudge";
308-
version = "dcca1b9ac15886060788df83c7da63faa5ae027f";
322+
version = "c90db830e84e34ac5724f57eda2f1112a589df5c";
309323
src = fetchFromGitHub {
310324
owner = "danielfm";
311325
repo = "smudge";
312-
rev = "dcca1b9ac15886060788df83c7da63faa5ae027f";
326+
rev = "c90db830e84e34ac5724f57eda2f1112a589df5c";
313327
fetchSubmodules = false;
314-
sha256 = "sha256-pwL9S+pZFrzlg07ZHL3kBQwa6SRcc++YlEseZrwDeVo=";
328+
sha256 = "sha256-ZBci8h1f0s0b9yKPXESr0iYyqejnAoWyct7NeJVCFFM=";
315329
};
316-
date = "2025-12-24";
330+
date = "2026-02-02";
317331
};
318332
typst-mode = {
319333
pname = "typst-mode";

emacs.d/early-init.el

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
1-
(with-eval-after-load 'scroll-bar
2-
(scroll-bar-mode -1))
1+
;; -*- lexical-binding: t -*-
32

4-
(with-eval-after-load 'tool-bar
5-
(tool-bar-mode -1))
3+
;; 起動前にGUI要素を無効化(with-eval-after-loadではなく直接無効化)
4+
;; これにより初期描画コストを大幅に削減
5+
(push '(menu-bar-lines . 0) default-frame-alist)
6+
(push '(tool-bar-lines . 0) default-frame-alist)
7+
(push '(vertical-scroll-bars) default-frame-alist)
68

7-
(with-eval-after-load 'menu-bar
8-
(menu-bar-mode -1))
9+
;; 起動時のGC閾値を最大化(後でinit.elで通常値に戻す)
10+
(setq gc-cons-threshold most-positive-fixnum)
11+
(setq gc-cons-percentage 0.6)
12+
13+
;; 起動中の不要な再描画を抑制
14+
(setq-default inhibit-redisplay t)
15+
(setq-default inhibit-message t)
16+
(add-hook 'emacs-startup-hook
17+
(lambda ()
18+
(setq-default inhibit-redisplay nil)
19+
(setq-default inhibit-message nil)))
20+
21+
;; ファイル名ハンドラを起動時に一時無効化(起動速度向上)
22+
(defvar startup/file-name-handler-alist file-name-handler-alist)
23+
(setq file-name-handler-alist nil)
24+
(add-hook 'emacs-startup-hook
25+
(lambda ()
26+
(setq file-name-handler-alist startup/file-name-handler-alist)))

0 commit comments

Comments
 (0)