Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

[BUG-40681] llGetNumberOfAgents() - companion to llGetAgentList() for retrieving count only. #12324

Open
sl-service-account opened this issue Oct 12, 2016 · 0 comments

Comments

@sl-service-account
Copy link

How would you like the feature to work?

integer llGetNumberOfAgents(integer scope, list options);

This new function would take the same arguments as llGetAgentList(), except that instead of returning a list of keys, it simply returns an integer count. Unfortunately this would means some crossover with llGetRegionAgentCount() which would be identical to llGetNumberOfAgents(AGENT_LIST_REGION, []) but that's a minor issue.

This issue is a repost of SCR-370, rather than a duplicate, as I do not have the ability to move issues.

Why is this feature important to you? How would it benefit the community?

Currently to get a count of avatars on a parcel requires calling llGetAgentList() and counting the result, however this is incredibly wasteful given that it is returning a list of keys that aren't even used, but also could potentially return a list of 100 keys, which could result in a stack/heap collision in scripts with insufficient memory.

This function is proposed as a simple companion that avoids the need to retrieve a full list that will not be used.

Original Jira Fields
Field Value
Issue BUG-40681
Summary llGetNumberOfAgents() - companion to llGetAgentList() for retrieving count only.
Type New Feature Request
Priority Unset
Status Accepted
Resolution Accepted
Reporter Haravikk Mistral (haravikk.mistral)
Created at 2016-10-12T13:12:38Z
Updated at 2016-10-26T18:38:33Z
{
  'Business Unit': ['Platform'],
  'How would you like the feature to work?': "{code}integer llGetNumberOfAgents(integer scope, list options);{code}\r\n\r\nThis new function would take the same arguments as [{{llGetAgentList()}}|https://wiki.secondlife.com/wiki/LlGetAgentList], except that instead of returning a list of keys, it simply returns an integer count. Unfortunately this would means some crossover with [{{llGetRegionAgentCount()}}|http://wiki.secondlife.com/wiki/LlGetRegionAgentCount] which would be identical to {{llGetNumberOfAgents(AGENT_LIST_REGION, [])}} but that's a minor issue.\r\n\r\nThis issue is a repost of SCR-370, rather than a duplicate, as I do not have the ability to move issues.",
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'Target Viewer Version': 'viewer-development',
  'Why is this feature important to you? How would it benefit the community?': "Currently to get a count of avatars on a parcel requires calling {{llGetAgentList()}} and counting the result, however this is incredibly wasteful given that it is returning a list of keys that aren't even used, but also could potentially return a list of 100 keys, which could result in a stack/heap collision in scripts with insufficient memory.\r\n\r\nThis function is proposed as a simple companion that avoids the need to retrieve a full list that will not be used.",
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant