Around 5 to 7 months ago, I wrote this module due to my issues with Debris being capped at 1000 objects in ~20 minutes while at lunch break. Its original (internal) name was “Debris2”, but for the sake of not causing confusion, I’ve renamed it before releasing.
Without further ado, here it is! The API is virtually the same as Debris.
P.S:
I’d love to see people benchmark this and compare it to Debris itself, if anyone has the time to do that feel free to reply letting me know how it goes.
This is actually extremely useful for me, I was running into issues related to the arbitrary limit of 1000 objects debris. I supposed the stars aligned for something like this to be made! Thank you!
The main idea is performance over using multiple coroutines and Debris itself, plus repeating the same four lines of code across multiple scripts won’t make life much easier.
Decided to do some runtime benchmarking and your module is definitely much faster.
Here are the test result averages after running each on 900 Instances over the course of 50 different tests on my computer:
FASTEST
Collector Module average runtime: ~0.0000007 seconds (7 zeros)
SECOND FASTEST
task.delay/Destroy() average runtime: ~0.0000026 seconds (6 zeros)
SLOWEST
Debris average runtime: ~0.0000038 seconds (6 zeros)
Even though this is fractions of a second, your module’s AddItem Method Runtime is on average, 4-5 times faster than the regular Debris AddItem.
Furthermore, this module is much more precise when deleting instances when compared to Debris since this module utilizes the task library, while Debris doesn’t.
In conclusion, this is just as you say, it’s a lightweight, uncapped, and also fast Debris alternative. Great work!
couple of other debris modules are just purely inefficient where debris:additem remains the victorious one in the end, there’s barely any well prominent debris modules and this is even more unusable.
I tried using debrisgobbler but it just created the largest table and when i tried to look into it in luauheap it froze my game indefinitely, even tho there aren’t supposed that absurd uses for such large table which proves debrisgobbler is more inefficient than debris service, Task library can also be memory costly and affect the library’s performance.