Optimize pcap reading for performance and low latency#2
Conversation
This enables immediate mode, uses ZeroCopyReadPacketData, and reduces read timeouts to 1ms to minimize libpcap buffering latency and eliminate memory allocation per packet captured. Co-authored-by: pgodwin <1046558+pgodwin@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Carve desktopDBs/dtRefs/nextDTRef out of Service into a desktopState type with its own RWMutex. The Desktop database call path (FPOpenDT, FPAddIcon, FPGet/AddAPPL, FPGetComment, etc.) no longer contends with fork, auth, or volume traffic on the shared s.mu. Helpers: desktop.lookup — ref → (db, volID, refExists); db may be nil desktop.lookupDB — strict variant; both ref and db must exist desktop.openRef — registers a new DTRefNum, lazily opens the volume DB desktop.closeRef — invalidates a DTRefNum desktop.dbForVolume — used by ingest/rebuild paths desktop.volumeOf — DTRefNum → volume id only Comment handlers use lookup (they fall back to the metadata backend when no DesktopDB is open). Icon/APPL handlers use lookupDB (they require a real DB to write into). Removes the desktopDBForVolumeLocked / "must hold s.mu" helper; ingest paths now just call s.desktopDBForVolume which is internally synchronised. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
DefaultEtherTalkConfigandDefaultMacIPConfigto use 1ms timeouts and enabled ImmediateMode for MacIP.ReadFrameto useZeroCopyReadPacketData()for improved throughput.PR created automatically by Jules for task 16743898710148923053 started by @pgodwin