Facepunch / garrysmod-issues

Garry's Mod issue tracker
141 stars 56 forks source link

Auto-refresh is really slow when addons on server are extracted. #801

Open Acecool opened 10 years ago

Acecool commented 10 years ago

I extracted all the addons on my dev server to remove the 500 Lua files of things I am not using.

I use weapon packs, and other things; all of the weapon packs have a ton of weapon lua files each, plus effects, plus entities, plus plus plus. I don't use them, I use the packs only for the models and use my own weapon base.

The issue is when the addons are extracted, and I update a game-mode file, it takes a lot longer than if they're in a gma file.

A while ago I asked for a feature to disable Lua files loading in certain addons, or all; I was willing to take anything. As it's not implemented, and with a bunch of addons coming with malicious code lately, I wanted to ensure that the only Lua running was Lua I wrote.

Previous time to use autorefresh with 49 addons and all of the files I ran was around 3-5 seconds max. I rewrote the autorefresh system to bring it to under 1 second.

With extracted addons, it takes around 20 seconds to autorefresh using the default system.

Lexicality commented 10 years ago

How many addons have you extracted? What's the reload time if you remove half of them?

On 6 February 2014 22:26, Josh notifications@github.com wrote:

I extracted all the addons on my dev server to remove the 500 Lua files of things I am not using.

I use weapon packs, and other things; all of the weapon packs have a ton of weapon lua files each, plus effects, plus entities, plus plus plus. I don't use them, I use the packs only for the models and use my own weapon base.

The issue is when the addons are extracted, and I update a game-mode file, it takes a lot longer than if they're in a gma file.

A while ago I asked for a feature to disable Lua files loading in certain addons, or all; I was willing to take anything. As it's not implemented, and with a bunch of addons coming with malicious code lately, I wanted to ensure that the only Lua running was Lua I wrote.

Previous time to use autorefresh with 49 addons and all of the files I ran was around 3-5 seconds max. I rewrote the autorefresh system to bring it to under 1 second.

With extracted addons, it takes around 20 seconds to autorefresh using the default system.

— Reply to this email directly or view it on GitHubhttps://github.com/Facepunch/garrysmod-issues/issues/801 .

Acecool commented 10 years ago

I have TDM svn, sickness svn, master-chris svn, plus 49 addons and a few misc extracted addons.

With all 49 extracted it takes about 20 seconds to auto-refresh. I went back through and deleted the folders, and let the server download all of them except the 4 m9k packs, and the 1 other firearm model. I kept those extracted and the rest in GMA and autorefresh time is back down to a few seconds.

Might be a bigger issue if I had more addons that I had to remove Lua files out of, luckily there were only 5.

Acecool commented 10 years ago

Unfortunately I have to extract all addons which include Lua files so I can stop them from running. Luckily it was only 5, but I tried with all of them extracted and it's what made the auto-refresh super-slow.

Acecool commented 10 years ago

That can't be done on a server where you use your steam api key and the content key that it's supposed to download. The only way to do that would be to remove the content from your addons directory on the server. I need the addons to be on the server, otherwise the models will be floating in the air without collision and you'd be unable to target them. I just don't want the Lua to run on certain addons such as weapon addons.