Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make bundle a computed property #109

Merged
merged 1 commit into from
Jul 19, 2024
Merged

Make bundle a computed property #109

merged 1 commit into from
Jul 19, 2024

Conversation

liamnichols
Copy link
Owner

Prior to this change, the bundle property was a custom BundleDescription enum that was a stored property, despite being the same for every value.

This causes a problem with supporting #108, because AnyClass is not Hashable so I want to work around this.

Instead, I've made bundle a computed property that returns the Foundation.Bundle directly. This is fine because the type itself ensures that it'll always be referencing the correct bundle.

This also allows me to remove the .from(_:) conversion methods.

Copy link

✅ Pull Request passed benchmark checks

Summary

Fri Jul 19 16:12:34 UTC 2024

===========================================================================================================
Threshold deviations for StringGenerator.generateSource(for:tableName:accessLevel:):XCStringsToolBenchmarks
===========================================================================================================
Time (total CPU) (ms, %) main pull_request Difference % Threshold %
p25 410 340 -17 5
p50 427 346 -19 5
p75 465 355 -23 5

New baseline 'pull_request' is BETTER than the 'main' baseline thresholds.


Comparing results between 'main' and 'pull_request'

Host 'Mac-1721404154025.local' with 3 'arm64' processors with 7 GB memory, running:
Darwin Kernel Version 23.5.0: Wed May  1 20:12:39 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_VMAPPLE

XCStringsToolBenchmarks

StringGenerator.generateSource(for:tableName:accessLevel:) metrics

Time (total CPU): results within specified thresholds, fold down for details.

Time (total CPU) (ms) * p0 p25 p50 p75 p90 p99 p100 Samples
main 410 410 427 465 465 465 465 3
pull_request 340 340 346 355 355 355 355 3
Δ -70 -70 -81 -110 -110 -110 -110 0
Improvement % 17 17 19 24 24 24 24 0

@liamnichols liamnichols marked this pull request as ready for review July 19, 2024 20:20
@liamnichols liamnichols merged commit 3bf9f3e into main Jul 19, 2024
13 checks passed
@liamnichols liamnichols deleted the ln/simplify-bundle branch July 19, 2024 20:21
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