Skip to content

Add an attribute encoding helper. - #15

Merged
ChadSikorra merged 1 commit into
mainfrom
upgrade/ldap-optimization
Jul 19, 2026
Merged

Add an attribute encoding helper.#15
ChadSikorra merged 1 commit into
mainfrom
upgrade/ldap-optimization

Conversation

@ChadSikorra

Copy link
Copy Markdown
Contributor

This is a tradeoff to keep ASN1 logic in this library, but provide a fast-path helper for LDAP. The performance gains of doing this are enough to warrant it. Attribute encoding on searches is very CPU intensive and this helps for large searches / lots of entries / lots of attributes. This will be used in the LDAP library as a way to optimize server side entry attribute encoding. I've already benchmarked the changes on the LDAP side and it's a roughly 40% encoding savings on searches.

This is a tradeoff to keep ASN1 logic in this library, but provide a fast-path helper for LDAP. The performance gains of doing this are enough to warrant it. Attribute encoding on searches is very CPU intensive and this helps for large searches / lots of entries / lots of attributes. This will be used in the LDAP library as a way to optimize server side entry attribute encoding.
@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.18182% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.55%. Comparing base (b57a38f) to head (9e0f2d0).

Files with missing lines Patch % Lines
src/FreeDSx/Asn1/Encoder/LengthEncodingTrait.php 88.88% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #15      +/-   ##
============================================
+ Coverage     95.13%   95.55%   +0.41%     
- Complexity      382      399      +17     
============================================
  Files            24       27       +3     
  Lines           967     1013      +46     
============================================
+ Hits            920      968      +48     
+ Misses           47       45       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChadSikorra
ChadSikorra merged commit d6cee05 into main Jul 19, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant