-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Describe your Feature
Have a way to cleanup a cached query. Usage for UI hooks in vide/react. They sometimes need to reiterate a query, so the query needs to be up-to-date. This is only possible with cached queries but they cant be cleaned up.
Implementation
Cached queries would have a query:cleanup() method that would disconnect the query so it no longer listens for archetype creation and doesnt take up memory.
Alternatives
Having a way to force a non-cached query to rematch archetypes. This way a query can be forced to be up to date without requiring a cached query. Hooks could also receive a function that creates the query, and recreate it everytime they need it.
Considerations
Some questions that need to be answered include the following:
- Will old code break in response to this feature?:
No. - What are the performance impacts with this feature (if any)?:
None if you dont use the method - How is it useful to include?:
Useful for hooks, and to have semi-dynamic cached queries: like one query per player, that would stay as long as the player is in the server.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request