Quote:
The first is that it seems to store all preferences in the same space. Meaning that if two plugins use the same id name they will stomp on each other.
|
I would hope this would never happen, i.e. two plugins using the same commands, but going on to your other ideas to "help" this one...
Quote:
The second is that it seems like there will inherent performance problems here. Since everything is stored in a single unindexed table, as time passes it seems like this grow unmanageable. Especially since there is no easy way to prune old entries.
|
Will add.
Quote:
If I take a quick look at the numbers lets say we have 10 plugins using the preference system. Server size varies but lets say that over time we are storing preferences for about 2000 people. A pretty conservative estimate I would say. Now lets assume that each plugin stores and average of three preferences each. That means the table has 60,000 rows. Every lookup has to now scan all those rows to find a match. Probably multiple times if they have more than one preference.
|
Point taken, will work on the design.
Quote:
Lastly, there is no ability to store meta data about the id's. This makes it difficult to extend this plugin for generic actions such as someone's suggestion about putting a menu system on top of it.
|
BAILOPAN has touched this issue in another
thread, but to expand I will not design the menu system for client prefs until the menu generation core is completed.
Quote:
Store each plugins information in a separate table or add a plugin field to the database. The former would help with performance more although it would be a little harder to manage.
|
Will add.
I'll have to add a "CreatePrefTable("plugin");" command.
Quote:
Put a composite index on steamid and id. This would make lookups a lot faster.
|
You already need the STEAMID and the "pref" id to select so I see no need to add the "composite index". I thought about this originally, but decided against it. With each plugin in a different "table", searching by SteamID and getting all those values will not be a problem.
Quote:
Add a timestamp to every row. Add a function to prune information over a certain age.
|
Will Add.
Default timeout will be forever, but plugins will be to set how many X days/hours/months/years it's good for for each ID, not just as a whole.
Quote:
Add the ability to store some meta data about the plugin. This would take some real thought to figure out what makes sense and how to make it work with translations.
|
This is not me. That's BAIL.
__________________