[TF2] Plugin keeper for tf2itemsinfo
1 Attachment(s)
The plugin reloads tf2itemsinfo on crash + the plugin that uses it
To make it work for other plugins you need to change PLUGINNAME to file name that uses tf2itemsinfo without .smx example "tf2ibwr" This plugin was written because of the fact that tf2itemsinfo crashes a lot Download sourcecode to modify pluginname define (#define PLUGINNAME "tf2bwr") |
Re: [TF2] Plugin keeper for tf2itemsinfo
... Wouldn't it be better to catch and fix the scenarios in which TF2ItemsInfo crashes?
|
Re: [TF2] Plugin keeper for tf2itemsinfo
Quote:
|
Re: [TF2] Plugin keeper for tf2itemsinfo
Reloading TF2ItemsInfo during a game is a huge performance hazard.
items_game.txt is 2.5 MB and only is growing bigger. Because TF2ItemsInfo traverses down the entire file (it's a VDF file after all), it uses the entire server processing thread, and as such the server stops responding to player inputs/outputs. (You will get the "connection error: disconnecting in X seconds" message.) Nothing would be more annoying than the server freezing randomly in the middle of a game because it is reloading TF2ItemsInfo. What Chdata said in fact is correct. (It would be a different story if you can run the tf2itemsinfo parsing in a separate thread from the main thread, but pawn is only single-threaded, so nope.) My experience: Reloaded TF2ItemsInfo on my own server, the server froze for a good 5-6 seconds on a decent CPU (CPU usage 100% on a single core). That would turn to 10-12 seconds on those using VPSes or less powerful CPUs. |
Re: [TF2] Plugin keeper for tf2itemsinfo
Well... considering the information in items_game.txt never changes, wouldn't it be best for one to use it in such a way that it only needs to find all the information once?
Like, OnPluginStart just cache a bunch of variables or something. (>>Is ignorant of what scenarios cause TF2ItemsInfo to crash). (>>Assuming people are using it in such a way... /any/ function is being called more than once) |
Re: [TF2] Plugin keeper for tf2itemsinfo
i'm sorry but do you not know what 'else' means in coding?
it means you don't need to do this: Code:
if (FindPluginByFile("tf2itemsinfo.smx") != INVALID_HANDLE) //check if plugin haven't crashedHaving this run every second is a hazard too.. |
Re: [TF2] Plugin keeper for tf2itemsinfo
I already suggested rewriting TF2ItemsInfo to have it write to a SQLite database when the server starts.
|
Re: [TF2] Plugin keeper for tf2itemsinfo
I thought Friagram wrote a better TF2 schema extension that actually works. Or maybe I'm thinking of someone else.
Either way, I remember reading someone else had an extension to do the same thing as TF2ItemsInfo does, with the only difference being that it doesn't crash randomly. |
Re: [TF2] Plugin keeper for tf2itemsinfo
Quote:
apple banana mango oranges potato |
Re: [TF2] Plugin keeper for tf2itemsinfo
Quote:
I haven't seen any plugin using it and its outdated last update was since 2013 tf2itemsinfo is better and deal with it |
| All times are GMT -4. The time now is 12:51. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.