Repository navigation
docs(PC0030): explain the loops-only scope and the record cache trade-off - #239
Merged
Merged
Conversation
…-off PC0030 now reports a read only when a Next() loop on the same variable follows it. The page explains why single-record reads are no longer reported (no measurable gain; repeated non-key reads lose the NST data cache), summarizes the BC 29.1 measurements, carries a breaking-change callout, and switches the examples to loop reads. Co-Authored-By: Claude Fable 5.1 <[email protected]>
A running total invites a CalcSums discussion and distracts from the SetLoadFields point. The example now collects e-mail addresses for a salesperson's customers, which has no set-based alternative and shows that the SetRange field is not loaded. Co-Authored-By: Claude Fable 5.1 <[email protected]>
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.
Companion to the Analyzers change that narrows PC0030 to reads that drive a
Next()loop (ALCops/Analyzers#678).What changed on the page
FindSet,Find,FindFirst,FindLast,Get,GetBySystemId) followed by a loop that callsNext()on the same variable.SetLoadFieldson frequently repeated non-key single reads, the BC 29.1 caveat, and a link to the investigation report on [Bug]: PC0030 - SetLoadFields should be used with caution Analyzers#531.FindSet/Nextloops; code fix section carried over with a loop example.Nextoutside a loop, a read inside its own loop body, a read without aNextloop._index.mdrow and the PC0031 link text updated to the new title.Built with
hugo --minify: no errors or warnings.🤖 Generated with Claude Code