Use frozen collections where suitable#24373
Merged
maliming merged 4 commits intoabpframework:devfrom Dec 31, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request introduces performance improvements by replacing mutable collections with frozen collections (FrozenDictionary<TKey, TValue> and FrozenSet<T>) for read-only data structures that are initialized once and never modified. The PR also includes code modernization changes using collection expression syntax ([]) for empty collections and fixes several code quality issues.
Key changes:
- Conversion of static/readonly Dictionary and HashSet collections to FrozenDictionary and FrozenSet for better runtime performance
- Modernization of empty collection initialization using collection expression syntax (
[]) - Code quality fixes including typo corrections (_onfigurations → _configurations), removal of double semicolons, cleanup of unused imports, and formatting improvements
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/docs/app/VoloDocs.Web/Pages/Error.cshtml.cs | Converted error messages dictionary to FrozenDictionary |
| framework/test/Volo.Abp.MultiLingualObjects.Tests/Volo/Abp/MultiLingualObjects/MultiLingualObjectManager_Tests.cs | Converted test translations to FrozenDictionary |
| framework/src/Volo.Abp.Specifications/Volo/Abp/Specifications/ParameterRebinder.cs | Updated empty dictionary initialization to use collection expression |
| framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/MongoModelBuilder.cs | Simplified object initialization syntax |
| framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDatabaseCollection.cs | Updated empty dictionary initialization to use collection expression |
| framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LocalizationResourceDictionary.cs | Updated empty dictionary initialization to use collection expression |
| framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/ProxyScriptingJsFuncHelper.cs | Converted reserved words collection to FrozenSet |
| framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/PostConfigureAbpRabbitMqEventBusOptions.cs | Converted queue argument collections to FrozenSet |
| framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs | Converted type collections to FrozenSet |
| framework/src/Volo.Abp.Core/Volo/Abp/Logging/DefaultInitLoggerFactory.cs | Updated to use collection expression and removed double semicolon |
| framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmPackagesUpdater.cs | Removed unused imports and updated collection initialization |
| framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiObjectExtensionPropertyInfoExtensions.cs | Converted type collections to FrozenSet |
| framework/src/Volo.Abp.BackgroundWorkers.TickerQ/Volo/Abp/BackgroundWorkers/TickerQ/AbpBackgroundWorkersTickerQOptions.cs | Fixed typo in field name (_onfigurations → _configurations) |
| framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/ObjectExtending/MvcUiObjectExtensionPropertyInfoExtensions.cs | Converted number types collection to FrozenSet |
| framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/DatePicker/AbpDatePickerBaseTagHelperService.cs | Converted input types dictionary to FrozenDictionary and improved code formatting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
....Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/PostConfigureAbpRabbitMqEventBusOptions.cs
Outdated
Show resolved
Hide resolved
....Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/PostConfigureAbpRabbitMqEventBusOptions.cs
Outdated
Show resolved
Hide resolved
...bp.MultiLingualObjects.Tests/Volo/Abp/MultiLingualObjects/MultiLingualObjectManager_Tests.cs
Outdated
Show resolved
Hide resolved
maliming
approved these changes
Dec 31, 2025
Member
|
Thank you for your contribution. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improves performance. Also made some code cleaning changes.