Skip to content

perf(foundation): the Extractor probes the pcap backend three times per extraction #2113

Closed

Description

@JarryShaw

Found while profiling #2110. Each extraction probes the pcap backend three times. Extractor._select_engine calls unsupported_reason twice, and the constructor probes once more. Each probe scans the installed distributions. After #2112 a scan costs about 115 µs, so the probes take around 0.35 ms of a roughly 0.64 ms extraction of the 6-packet in.pcap (3.15, Docker).

Proposed: probe once per extraction, or cache the result for the process, as long as installing a package mid-process doesn't need noticing. Then re-measure with examples/benchmark/run.sh. This touches pcapkit/foundation/extraction.py, so it waits for #2104 and #2106.

Activity

  1. added
    perfPull requests that improve performance (perf: subject prefix)
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 23, 2026
  2. moved this to Blocked in PyPCAPKiton Oct 23, 2026
  3. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 23, 2026
  4. moved this from Blocked to WIP in PyPCAPKiton Oct 23, 2026
  5. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 24, 2026
  6. added this to the PyPCAPKit v1.5 milestone on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    perfPull requests that improve performance (perf: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions