Closed rlguy closed 2 years ago
The addon requires scripts to run continuously in order to manage all of the features and functionality of the addon. Running these scripts will add some overhead that can decrease performance if there are a large number of objects in the scene. However, since this issue happens when the addon is not being actively used, I would consider this a problem that should be fixed.
It looks like this viewport performance decrease is caused by a design issue in the FLIP Fluids addon. The slowdown is caused by the addon continuously checking whether there is a FLIP Fluids addon Domain in the scene. This is how the addon determines if it is being used or not. If a Domain object is detected, then the addon begins running other necessary management scripts.
Searching for a Domain object becomes slower as the number of objects in the scene increases. When moving around objects in the viewport, this triggers many "scene updates" in Blender and the addon will perform a Domain search on every scene update. Depending on the scene and what other addons are installed, this search could be triggered 60 - 120 times or even more per second.
The fix for this issue is to re-design how the addon determines whether it is in use or not. The fix could be to greatly reduce the frequency of domain searches, or to eliminate the search altogether by implementing "smarter" ways to detect whether the addon is being used.
This issue should be fixed before the next stable release of the FLIP Fluids addon (date TBA).
Until this issue is fixed, if you are working on a scene with many objects, you may want to disable the FLIP Fluids addon when you are not using the addon.
Update: we've added some optimizations to improve performance during scene updates. These changes will be available in the next experimental build of the FLIP Fluids addon (v9.3.3, release TBA but likely during next week) or in the next stable version (v1.4.0, release TBA but likely shortly before Blender 3.2 release on June 8th).
Timing Notes:
Before optimizations:
After optimizations:
If the addon is active, it will perform best if there is a simulation domain object contained in the scene, but there will still be a 25 - 30ms processing time required for each scene update with 8192 objects in order to manage the functions of the addon. Other addon operations may also require a longer time with a large number of objects.
When using the FLIP Fluids addon, we would recommend keeping the number of objects in the scene lower for best performance. For example, a scene with 1000 objects after this update will require about 5 - 10ms which keeps the viewport still quite responsive.
System Information
Blender Version: 3.2.0 Beta, master, 2022-05-02 13:58, 5188c14718c5 Addon Version: A FLIP Fluid Simulation Tool for Blender (v9.3.2 Experimental 30-MAR-2022) OS: Windows-10-10.0.19044-SP0 GPU: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 465.89 CPU: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz RAM: Unknown (fill in)
This issue should also be reproduceable in all Blender versions 2.80 or later, and all FLIP Fluids addon versions 1.0.5 or later.
Describe the bug
When the FLIP Fluids addon is enabled, scenes with a large number of objects (ex: in the low thousands) will cause the viewport to become slow and less responsive. This happens even if there are no FLIP Fluids addon objects present in the scene and only enabling the addon is required to reproduce the issue.
To Reproduce
Attached is a .blend file that reproduces the issue: 8192_objects.zip
Expected Behaviour
When the FLIP Fluids addon is not in use, the viewport should remain as quick and as responsive as before the addon was enabled.
Actual Behaviour
The viewport becomes slow and less responsive.