Tinter / Tinter-Furniture

Script to return the furniture from space
GNU General Public License v3.0
13 stars 4 forks source link

Improving Performance #10

Closed Tinter closed 4 years ago

Tinter commented 4 years ago

It seems the biggest bottleneck from testing in Kavala, is nearObjects used to find buildings. This is presumably the case of stutters.

Tinter commented 4 years ago

private _buildings = (_pos nearObjects ["House_F", RANGE]) select {!(isObjectHidden _x) && {!(_x getVariable ["tint_house_blacklisted", false])} && {alive _x}}; _buildings = []; and // private _buildings = (_pos nearObjects ["House_F", RANGE]) select {!(isObjectHidden _x) && {!(_x getVariable ["tint_house_blacklisted", false])} && {alive _x}}; _buildings = []; both still produce microstutters in Kavala. Would point to the issue being somewhere else.

Tinter commented 4 years ago

The case of micro stutters is my mods. Stuttering is not found when running only CBA, so that points to performance being great. In any case, commit 1b222bb tries to spread the load of spawning furniture. I'm not sure if this actually makes such a big difference, but it seemed a good idea at the time.