detached 60778dc

refactor(dispatch): remove unused direct dispatcher and dead fields

commit
60778dcb91359787290612e001ca948a7ac1a797
author
brice · · 2026-09-28 07:42 UTC
parent
3e99709
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +0 -35
M event_pool.go +0 -34
@@ -27,10 +27,6 @@ type EventDispatcher struct {
2727
2828 // Extended handlers for object IDs >= 1024 (rare case)
2929 extHandlers sync.Map
30-
31- // Pre-allocated event objects to avoid allocations
32- eventCache [64]Event
33- eventIndex atomic.Uint32
3430 }
3531
3632 // handlerEntry stores handlers for a specific object
@@ -166,36 +162,6 @@ type RawEvent struct {
166162 Data []byte
167163 }
168164
169-// DirectDispatcher provides the absolute fastest dispatch path for hot events
170-type DirectDispatcher struct {
171- // Direct function pointers for the hottest paths (e.g., pointer motion)
172- pointerMotion func(surfaceX, surfaceY Fixed)
173- pointerButton func(button, state uint32)
174- keyboardKey func(key, state uint32)
175- frameCallback func(callbackData uint32)
176-
177- // Fallback to regular dispatcher
178- fallback *EventDispatcher
179-}
180-
181-// DispatchPointerMotion dispatches pointer motion events with zero overhead
182-//
183-//go:inline
184-func (d *DirectDispatcher) DispatchPointerMotion(surfaceX, surfaceY Fixed) {
185- if d.pointerMotion != nil {
186- d.pointerMotion(surfaceX, surfaceY)
187- }
188-}
189-
190-// DispatchPointerButton dispatches pointer button events with zero overhead
191-//
192-//go:inline
193-func (d *DirectDispatcher) DispatchPointerButton(button, state uint32) {
194- if d.pointerButton != nil {
195- d.pointerButton(button, state)
196- }
197-}
198-
199165 // Ensure cache line alignment for hot data structures
200166 type cacheLinePad [64]byte
201167
@@ -27,10 +27,6 @@ type EventDispatcher struct {
27 27
28 // Extended handlers for object IDs >= 1024 (rare case)28 // Extended handlers for object IDs >= 1024 (rare case)
29 extHandlers sync.Map29 extHandlers sync.Map
30-
31- // Pre-allocated event objects to avoid allocations
32- eventCache [64]Event
33- eventIndex atomic.Uint32
34 }30 }
35 31
36 // handlerEntry stores handlers for a specific object32 // handlerEntry stores handlers for a specific object
@@ -166,36 +162,6 @@ type RawEvent struct {
166 Data []byte162 Data []byte
167 }163 }
168 164
169-// DirectDispatcher provides the absolute fastest dispatch path for hot events
170-type DirectDispatcher struct {
171- // Direct function pointers for the hottest paths (e.g., pointer motion)
172- pointerMotion func(surfaceX, surfaceY Fixed)
173- pointerButton func(button, state uint32)
174- keyboardKey func(key, state uint32)
175- frameCallback func(callbackData uint32)
176-
177- // Fallback to regular dispatcher
178- fallback *EventDispatcher
179-}
180-
181-// DispatchPointerMotion dispatches pointer motion events with zero overhead
182-//
183-//go:inline
184-func (d *DirectDispatcher) DispatchPointerMotion(surfaceX, surfaceY Fixed) {
185- if d.pointerMotion != nil {
186- d.pointerMotion(surfaceX, surfaceY)
187- }
188-}
189-
190-// DispatchPointerButton dispatches pointer button events with zero overhead
191-//
192-//go:inline
193-func (d *DirectDispatcher) DispatchPointerButton(button, state uint32) {
194- if d.pointerButton != nil {
195- d.pointerButton(button, state)
196- }
197-}
198-
199 // Ensure cache line alignment for hot data structures165 // Ensure cache line alignment for hot data structures
200 type cacheLinePad [64]byte166 type cacheLinePad [64]byte
201 167
M shm.go +0 -1
@@ -7,7 +7,6 @@ import (
77
88 // ShmPool represents a shared memory pool
99 type ShmPool struct {
10- id uint32
1110 fd int
1211 size int
1312 data []byte
@@ -7,7 +7,6 @@ import (
7 7
8 // ShmPool represents a shared memory pool8 // ShmPool represents a shared memory pool
9 type ShmPool struct {9 type ShmPool struct {
10- id uint32
11 fd int10 fd int
12 size int11 size int
13 data []byte12 data []byte

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 8

↑↓ moveenter openesc close