ElunaLuaEngine / Eluna

Eluna Lua Engine © for WoW Emulators
https://elunaluaengine.github.io
GNU General Public License v3.0
372 stars 356 forks source link

Optimize require, streamline script running to always just call require #478

Closed Rochet2 closed 5 months ago

Rochet2 commented 5 months ago

Previously the precompilation cache was not used for scripts that were loaded through require. Now require first always tries to load precompiled script and otherwise falls back to default loading.

As require is now able to access the precompiled scripts, we can default to it for running scripts.

Rochet2 commented 5 months ago

We basically move the luaL_loadbuffer to be called through package.loaders