Skip to content

Dispose event handlers created for ordering and shard dynamic proxy generation - #26263

Draft
maliming wants to merge 2 commits into
devfrom
maliming/event-handler-order-and-proxy-shards
Draft

maliming wants to merge 2 commits into
devfrom
maliming/event-handler-order-and-proxy-shards

Conversation

@maliming

@maliming maliming commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

LocalEventBus reads a handler's order from the type its Autofac registration creates, so an IoC handler is created once per publish; when the type can't be known, it creates one to read the order and disposes it. Orders are cached per type.

AbpShardedProxyBuilder spreads Autofac proxies over 16 modules. With about 1,000 proxies, startup went from 37 s to 14 s.

Entity and inherited generic event data use a cached constructor instead of Activator.CreateInstance, so its invoke stub is not compiled again after each GC.

Copilot AI balanced review requested due to automatic review settings October 11, 2026 08:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.95215% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.50%. Comparing base (faf79a6) to head (66a9579).
⚠️ Report is 17 commits behind head on dev.

Files with missing lines Patch % Lines
...c/Builder/AbpInterceptionRegistrationExtensions.cs 87.41% 10 Missing and 8 partials ⚠️
...Autofac/Volo/Abp/Autofac/AbpShardedProxyBuilder.cs 94.44% 2 Missing ⚠️
...utofac/Builder/AbpRegistrationBuilderExtensions.cs 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #26263      +/-   ##
==========================================
+ Coverage   50.44%   50.50%   +0.05%     
==========================================
  Files        3845     3847       +2     
  Lines      136089   136286     +197     
  Branches    10340    10360      +20     
==========================================
+ Hits        68654    68833     +179     
- Misses      65365    65378      +13     
- Partials     2070     2075       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maliming
maliming marked this pull request as draft October 11, 2026 11:48
@maliming
maliming force-pushed the maliming/event-handler-order-and-proxy-shards branch from b231ae5 to 5590148 Compare October 12, 2026 07:58
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.

2 participants