Skip to content

Performance Tips ​

Caching & Optimization

Automatic Caching: Frequently accessed values are cached automatically for performance Cache Management: Use ClearCache() only when necessary (debugging, memory concerns) Readiness Checks: Use IsReady() before bulk operations to avoid unnecessary waits Specific Listeners: Use specific paths instead of global "." listeners when possible Connection Cleanup: Always disconnect listeners to prevent memory leaks

Best Practices

Fallbacks: Always provide fallbacks when accessing data that might not exist Auto-Waiting: Data access automatically waits - no manual waiting required Conditional Logic: Use IsReady() only for conditional logic or optimization Listener Management: Disconnect listeners when UI elements are destroyed Path Specificity: Use specific paths instead of listening to all changes Action Handling: Handle different action types in global listeners for better UX Read-Only Data: Don't modify returned data - it's a reference to actual data

PlayerState - High-Performance Roblox Data Management