[PR #45] Improve BinaryPropertyListWriter performance #73

Closed
opened 2026-01-30 21:27:00 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/claunia/plist-cil/pull/45

State: closed
Merged: Yes


This PR improves the performance of the BinaryPropertyListWriter by using a Dictionary<NSObject, int> to store the indices of binary objects instead of a Collection<NSObject>. It removes the need to do an IndexOf, which scans the entire list. That is a very expensive O(N) operation.

This results in a 97% performance improvement on Windows (i.e. 30 times as fast) and a 98% performance improvement on Linux.

**Original Pull Request:** https://github.com/claunia/plist-cil/pull/45 **State:** closed **Merged:** Yes --- This PR improves the performance of the BinaryPropertyListWriter by using a `Dictionary<NSObject, int>` to store the indices of binary objects instead of a `Collection<NSObject>`. It removes the need to do an `IndexOf`, which scans the entire list. That is a very expensive O(N) operation. This results in a 97% performance improvement on Windows (i.e. 30 times as fast) and a 98% performance improvement on Linux.
claunia added the pull-request label 2026-01-30 21:27:00 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: claunia/plist-cil#73