You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(protocols): import the protocol, schema and data packages lazily #2730
Ruling (owner, in session): the pcapkit.protocols packages, along with their schema and data subpackages, import lazily where possible, as pcapkit.const does in the companion issue.
#2534 regroups each protocol's protocol, schema and data modules, and it moves every module these package __init__ files import. This is blocked until #2534 merges, so the two changes do not rewrite the same files at once. It then reuses the shared lazy-import helper from the const work.
Protocol dispatch already imports the next layer by module path, so making the packages lazy should keep dispatch working. Each registry that a package's import fills in, such as the register calls, has to keep working.
#2534 has landed (#2753), so this is unblocked. A fix is in progress on a branch off 1b4f9703e. It makes the layer-level and top-level protocol aggregation lazy through lazy_exports. Each protocol package __init__ keeps its literal imports, per the #2753 layout ruling. It measures import pcapkit first, and stops with a recommendation if the gain is negligible.
Activity
JarryShaw commentedon Nov 4, 2026
#2534 has landed (#2753), so this is unblocked. A fix is in progress on a branch off
1b4f9703e. It makes the layer-level and top-level protocol aggregation lazy throughlazy_exports. Each protocol package__init__keeps its literal imports, per the #2753 layout ruling. It measuresimport pcapkitfirst, and stops with a recommendation if the gain is negligible.JarryShaw commentedon Nov 4, 2026
The PR is #2757.
perf(protocols): import the packages above a protocol's on first use (#…