Skip to content

Tiny performance tuning in CalcAuth#1217

Merged
NikkiLacrima merged 1 commit into
mainfrom
cruelraremaster-patch-1
Jul 3, 2026
Merged

Tiny performance tuning in CalcAuth#1217
NikkiLacrima merged 1 commit into
mainfrom
cruelraremaster-patch-1

Conversation

@cruelraremaster

@cruelraremaster cruelraremaster commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Tiny performance tuning:
llListFindList(g_lBlock,[sID]) is executed in any cases of the if under any circumstances. In some scenarios it is executed twice - so the line

if(llListFindList(g_lBlock,[sID])!=-1)return CMD_BLOCKED;

could also be executed prior the if, which provides a tiny bit of performance e.g. in cases somebody being neither wearer nor owner clicks the collar.

Tiny performance tuning:
`llListFindList(g_lBlock,[sID])` is executed in any cases of the if under any circumstances.
In some scenarios it is executed twice - so the line

   if(llListFindList(g_lBlock,[sID])!=-1)return CMD_BLOCKED;

could also be executed prior the if, which provides a tiny bit of performance e.g. in cases neither nor owner click the collar.
@NikkiLacrima

Copy link
Copy Markdown
Contributor

Looks correct, if kID is blocked it will always return CMD_BLOCKED irrespective of other conditions, so it can be move up. Still should be given sanity testing, not that the performance will ever be noted, but the logic is clearer.

@NikkiLacrima NikkiLacrima left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, approved.

@NikkiLacrima NikkiLacrima merged commit 2500e6a into main Jul 3, 2026
2 checks passed
@NikkiLacrima NikkiLacrima deleted the cruelraremaster-patch-1 branch July 3, 2026 18:34
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.

2 participants