Yeah seeing about a 300% performance boost with connect parallel mad
I am unable to find this function anywhere in this file
Could you perhaps update the download?
Oh yes, I thought it would automatically update since I have a PackageLink, holdon updating it right now!
Download updated! Feel free to test it out
Do you know of a way for modules to remotely get updated, since PackageLinks donāt seem to work? I really do not like having to update the download everytime
Package links work fine, Its just that they often fail to fetch latest version.
I see I see. Well alright then
Ok guys, so I just did a test with 4800 individual Zones, to compare the performance on :BindToHeartbeatParallel() vs :BindToHeartbeat(), and I think the result is pretty surprising!
I honestly think this is because :BindToHeartbeatParallel() needs its own GetPlayerFromCharacter function as Players:GetPlayerFromCharacter() is unsafe to call from parallel, whereas the normal :BindToHeartbeat() function can just use that.
Iāll try out some things to see if I can maybe change this, for now just keep using :BindToHeartbeat()
Yeah I donāt think this is fixable, the normal :BindToHeartbeat() works just fine, I am gonna remove the :BindToHeartbeatParallel() method, sorry guys!!
To have a workaround, you can just loop through players and check if its a descendant of the character.
I got 3x improvement by distributing just the GetPartBoundsInBox between different actors, I think the downgraded performance comes from you searching for a players character for every part inside the zone per frame. You should use PlayerAdded/CharacterAdded and a table to make a lookup eg
local Characters = {
[PlayerName] = Character
}
local Character = Characters[PlayerName]
Just donāt forget to update it on character added and remove any entires using PlayerRemoving. Roblox has a example of distrusting tasks between actors here near the end.
I see, I will keep this in mind, thank you.
Have you done any performance comparisons to ZonePlus? I know ZonePlus has big issues with it but considering you use the same method thought Iād see if itās worth switching over or not / if itās just going to produce the same results.
After I finish implementing the parallel query stuff Iāll do a benchmark and let you know
does this accept folders like zoneplus, and can you bring over the ability to get a random position, or better yet a cframe, from a zone?
trying to make a region based spawner, and zoneplus just hasnt been working, throwing errors for things the api claims exists
Since the .Query callback is customizable, you can just do SimpleZone.fromCustom(ā¦) and provide a query function that queries all parts inside of a certain folder.
And yeah Iām gonna add the second one, just finishing up parallel benchmarks right now
would you be willing to open this on github, would love to be able to contribute to source aswell
Now this is a very good alternative to ZonePlus! And the source code is easier to read too, good job and thank you for this module!
Alright guys, here are the results with the new parallel stuff I added!
(Tests are done on PS4 with 313 individual Zones)
(The first one is with the new .fromPartParallel(), the second one is using the normal .fromPart())
As you can see, there is significantly more lag with the second one.
This time, each Zone has its own Actor, which was different the way I implemented it earlier.
I will be adding SimpleZone.fromPartParallel() to the documentation, next up are ZonePlus vs SimpleZone benchmarks
Let me know if you havenāt recieved the changes in the download yet, could just be the PackageLink acting up again