Skip to content

Optimize pcap reading for performance and low latency#2

Open
pgodwin wants to merge 1 commit intomainfrom
optimize-pcap-performance-16743898710148923053
Open

Optimize pcap reading for performance and low latency#2
pgodwin wants to merge 1 commit intomainfrom
optimize-pcap-performance-16743898710148923053

Conversation

@pgodwin
Copy link
Copy Markdown
Contributor

@pgodwin pgodwin commented Apr 18, 2026

  • Changed DefaultEtherTalkConfig and DefaultMacIPConfig to use 1ms timeouts and enabled ImmediateMode for MacIP.
  • Switched ReadFrame to use ZeroCopyReadPacketData() for improved throughput.

PR created automatically by Jules for task 16743898710148923053 started by @pgodwin

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>
@google-labs-jules
Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

pgodwin added a commit that referenced this pull request May 1, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant