Pause building of modified collection. Fixes #256 - #484
Conversation
| return entry; | ||
| } | ||
|
|
||
| public void PauseInternalEntryUpdates() |
There was a problem hiding this comment.
I'd make a IDisposable object that would flip the boolean back to true on Dispose so that way a using statement can be used in the implementation
There was a problem hiding this comment.
I thought about that. Such a pause-object would need to know the instance of the AbstractWritableArchive in order to flip the boolean and to call RebuildModifiedCollection on that instance when the pause-object is disposed.
This requires the user to use the using statement - if the user don't and the user doesn't dispose the pause-object himself, then it will be disposed some time later where the AbstractWritableArchive might have been disposed. It is difficult to get right.
Therefore I opted for the pattern used in WinForms where SuspendLayout/ResumeLayout is commonly used for performance reasons when larger updates of lists or tree structures are updated.
So I don't see how to do this in a nice way (but I am happy to be educated on the issue ;-) if you can show me how)
|
Check out #485 |
|
Check my code comments. |
Allow for not rebuilding of modified collection while adding all files under a directory.