Streaming
- By reducing the part count, as fewer parts lead to better performance.
- Optimize textures to balance visual quality and performance, especially for lower-end devices.
- Optimize lighting by limiting dynamic lights and using shadowless lights where possible, as these adjustments reduce the computational load and improve overall game performance.
Streaming Configurations
Default | The engine chooses the best option, currently the same as Legacy. |
Legacy | Models load with their parent when a player joins and don't unload unless the parent does. |
Improved | Models load only when needed, not during player join. Non-spatial models load shortly after, while spatial models load as required and can be unloaded later. |
Enables or disables streaming of game content.
Default | No extra checks; players may encounter missing content. |
PauseReceive | Pauses data reception if critical parts are missing, avoiding gameplay issues. |
Request | Requests missing parts when a player enters an area, reducing the chances of encountering unloaded content. |
Sets the minimum area around the player where content streams in with the highest priority. Default is 64 studs. Increasing this value uses more memory and bandwidth.
Defines the maximum distance from the player where content is streamed. Default is 1024 studs. The engine may keep previously loaded content beyond this radius if memory allows.
Default | Content is only removed when memory is low (same as LowMemory). |
LowMemory | Unloads content to free up memory when necessary. |
Opportunistic | Unloads content beyond the target radius even without memory pressure, optimizing performance. |
Level of Detail (LOD)
StreamingMesh | Uses a lower resolution 'imposter' mesh for models outside the streaming radius. |
Disabled/Automatic | Lower resolution meshes aren't displayed, maintaining full detail within the streaming radius. |
Physics
More Optimization Options
- By reducing the part count, as fewer parts lead to better performance.
- Optimize textures to balance visual quality and performance, especially for lower-end devices.
- Optimize lighting by limiting dynamic lights and using shadowless lights where possible, as these adjustments reduce the computational load and improve overall game performance.
- Efficient Use of Parts and Meshes: Minimizing the use of high-polygon meshes and using Roblox’s BaseParts when possible.
- Script Optimization: Identifying and eliminating unnecessary loops, optimizing algorithms, and using efficient data structures.
- Network Optimization: Reduce data transmission and ensure smooth client-server communication.
- Client-Side Optimizations: Offloading tasks to the client to reduce server load and improve responsiveness.
- Debris Service: Using Debris Service in managing temporary objects.
local Debris = game:GetService("Debris")
local part = Instance.new("Part")
part.Position = Vector3.new(0, 10, 0)
part.Parent = workspace
-- Add the part to Debris, which will remove it after 5 seconds
Debris:AddItem(part, 5)
Microprofiler
Ctrl Alt F6 (⌘⌥F6)
Microprofiler (Blue & Orange Color)
Color Bar | Details | Indication |
---|---|---|
Orange | Jobs time exceeds Render time in standard frames. | Indicates normal performance where CPU is the focus. |
Blue | Render time exceeds Jobs time. | Signals a rendering bottleneck. Hover to see details on 'Waiting for Rendering Thread.' A large number of blue bars suggests that rendering is the primary issue. |
Microprofiler (Spikes)
Graph Position | Details | Indication |
---|---|---|
Middle | Bars should generally be around the middle of the graph. | Indicates normal operation with balanced task scheduling. |
Spikes | Bars spike or increase in value above the middle of the graph. | Indicates that more time was taken to perform a Task Scheduler process, often due to increased workload, such as handling many moving parts. |
Microprofiler (Pause)
Ctrl P (⌘P)
Microprofiler (Zoom in)
Right-clicking a label zooms the timeline to match the label's duration.
Left-clicking shows line graph at the bottom right of the game view, showing how long the task takes each frame. This graph allows for performance testing.
Main | Details |
---|---|
Main | Manages input, physics, animations, sound, Studio updates, and coordinates other threads. |
Worker | Assists the main thread with tasks like networking, physics, and pathfinding. Multiple workers are used based on CPU cores. |
Render (GPU) | Handles graphics rendering. |
Custom Profiling
local Debris = game:GetService("Debris")
local part = Instance.new("Part")
part.Position = Vector3.new(0, 10, 0)
part.Parent = workspace
-- Add the part to Debris, which will remove it after 5 seconds
Debris:AddItem(part, 5)
If you found this tutorial helpful and would like to support my work, please consider buying me a coffee.
Thank you very much for your support!
Buy me a coffee