Use ordinal comparisons when detecting changes.
Performance optimization
Improve resource merge logic.