Repository navigation
Conversation
Signed-off-by: Zafer Balkan <zafer@zaferbalkan.com>
Signed-off-by: Zafer Balkan <zafer@zaferbalkan.com>
Signed-off-by: Zafer Balkan <zafer@zaferbalkan.com>
Signed-off-by: Zafer Balkan <zafer@zaferbalkan.com>
Signed-off-by: Zafer Balkan <zafer@zaferbalkan.com>
Signed-off-by: Zafer Balkan <zafer@zaferbalkan.com>
Signed-off-by: Zafer Balkan <zafer@zaferbalkan.com>
zbalkan
force-pushed
the
feat/deferred-view-updates
branch
from
September 16, 2026 14:42
fafc6d3 to
f5004d3
Compare
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.
Summary
Adds
ObjectListView.DeferViewUpdates(), anIDisposablewrapper around the existingFreeze()/Unfreeze()mechanism.The method allows callers to write:
instead of manually pairing
Freeze()andUnfreeze().Motivation
This does not add a new update mechanism.
ObjectListViewalready supports nested update suppression throughFreeze()andUnfreeze().The main benefit is making that existing API easier to use safely in code paths containing exceptions, early returns, or multiple nested callers. Disposing the returned scope releases only the freeze acquired by that scope.
Existing callers that use balanced
Freeze()/Unfreeze()pairs remain fully compatible and do not need to migrate.The practical value is therefore mostly API ergonomics and exception safety. It does not provide a performance improvement by itself and does not materially change behavior for users who do not use explicit update batching.
Changes
DeferViewUpdates()toObjectListView.Unfreeze()when disposed.Tests
The regression suite covers:
Freeze();DataListViewupdate behavior;FastDataListViewupdate behavior.Compatibility
This is an additive API change.
Existing code such as:
continues to behave as before.
DeferViewUpdates()uses the same underlying freeze counter, so manual and scoped freezes can be nested. Each caller should release only the freeze it acquired.Limitations
This PR intentionally does not:
Freeze()/Unfreeze();For most consumers this is therefore a convenience API rather than a new capability.