perf: reduce reference-counting overhead and DBIx::Class warnings#871
Open
fglock wants to merge 2 commits into
Open
perf: reduce reference-counting overhead and DBIx::Class warnings#871fglock wants to merge 2 commits into
fglock wants to merge 2 commits into
Conversation
Register owned scalar references once after rescue handling, remove unnecessary synchronization from the single-threaded weak scalar registry, and release empty reverse weak-reference buckets on unweaken. Add a focused tracked-store benchmark and document the measured 11.1% median CPU improvement and full DBIx::Class validation. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
Keep caught base::import failures from leaking duplicate stderr output, align bundled core module versions with their runtime values, and patch Exception::Class generated subclasses to match their registered source file. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
unweakenbase::importfailures from printing duplicate stderr diagnostics%INCPerformance
Three fresh JVM runs of
dev/bench/benchmark_refcount_store.pl:168466619)This is an 11.1% reduction in CPU time for tracked reference stores after
weaken()activates lifecycle bookkeeping.The ordinary method benchmark remained approximately 2.35 CPU seconds on both revisions.
DBIx::Class warnings
t/00describe_environment.tno longer reports:Exception::Class 1.45 still contains the upstream 1.1/1.45 mismatch; the CPAN distroprefs patch keeps the generated class version consistent with
Exception/Class.pmwhile preserving its%INCregistration.Validation
prove src/test/resources/unit/core_module_file_versions.t./jperl src/test/resources/unit/core_module_file_versions.tt/00describe_environment.t: passed with none of the targeted warningsmake: successful./jcpan --jobs 8 -t DBIx::ClassSafety notes
Two broader reference-counting optimizations were evaluated and rejected after unit-test regressions:
The retained performance changes preserve the existing lifecycle state machine. The warning changes retain catchable
baseexceptions and validate file/runtime version consistency with a portable test that also passes on standard Perl.Generated with Codex