Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua scripts optimizations #919

Open
4 tasks
Xottab-DUTY opened this issue Nov 29, 2021 · 3 comments
Open
4 tasks

Lua scripts optimizations #919

Xottab-DUTY opened this issue Nov 29, 2021 · 3 comments

Comments

@Xottab-DUTY
Copy link
Member

Xottab-DUTY commented Nov 29, 2021

  • xr_logic.script: parse_condlist – very unoptimized function: cycle with regexp in cycle with regexp in cycle with regexp. (mama, za chto...)
  • bind_anomaly_zone.script: update function does nothing, just remove. Saves ~1 ms per frame.
  • Sounds loading when NPC switches to online.
  • blowout: cycle in cycle in cycle, really slow. Also kills you, despite the fact that you have godmode mode enabled.
@Xottab-DUTY
Copy link
Member Author

#1117 could improve some scripts imperfections.

@Xottab-DUTY
Copy link
Member Author

bind_anomaly_zone.script: update function does nothing, just remove. Saves ~1 ms per frame.

The problem is that Lua function calls C++ function which is empty. This can be workarounded on the engine side by making empty C++ function Lua function. This is not easily possible with luabind though, but possible with, for example, sol3, which can be taken as an example.

@Xottab-DUTY
Copy link
Member Author

With the Lua profiler #1436 and #1771 it's possible to identify bottlenecks for further optimization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

1 participant