mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 08:01:24 +00:00
d41b0f1feb0b13ad7a090f7930d8f6ca72d3c0a1
Adjustments:Load() runs from the esx:playerLoaded handler, so it runs again on every character switch. AmmoAndVehicleRewards, Multipliers and DiscordPresence each start a `while true` thread that never exits, and SeatShuffle and DisableRadio register another esx:enteredVehicle handler. Nothing tears any of it down, so a player who switches characters a few times ends up with several per-frame threads all writing the same values, and client performance degrades until they reconnect. The loops now run `while ESX.PlayerLoaded`, the same way StartServerSyncLoops and Actions:SlowLoop already do, so they end on logout and a fresh one starts on the next load. The two event handlers are registered once. Actions:Init already documents this exact concern in a comment; Adjustments never got the same treatment. Measured in game on artifact 25770 by counting thread ticks per frame: before: 2.01 -> 3.01 -> 4.02 across two relogs after: 1.00 -> 1.00 -> 1.00
ESX Legacy
Discord - Website - Documentation
Want more resources? You can browse the Cfx.re Releases board for more!
ESX is the leading framework, trusted by over 12,000 communities to provide the highest quality roleplay servers on FiveM
💗 Supporters
Interested in helping us? Take a look at our patreon
| We would like to sincerely thank the following donors who helped fund the development of ESX. |
|---|
| Mohamad Buhamad - Michael Hein - RoadToSix - Montree Narathong |
| Saydoon - Muhannad alyamani - iSentrie - Wecity - Samuel Nicol |
| Kyle McShea - Artin - Mathias Christoffersen - Jaylan Yilmaz - Callum |
| CONGRESS KW - Michael Hein - Smery sitbon - daZepelin - CMF Community |
Description
Languages
JavaScript
62.3%
Lua
34.8%
TypeScript
1.2%
HTML
0.8%
CSS
0.7%
Other
0.2%