* Reworked Gear Plating Name functionality to fix some gaps and omissions, as well as added a `fix-gear-plating` dev command.
* Update DeveloperDatabaseCommands.cs
---------
Co-authored-by: OptimShi <26606778+OptimShi@users.noreply.github.com>
Co-authored-by: Ty Conner <tyconner@itcproductions.com>
* Step 1. Add new adapter classes and models
All classes and objects added are in new namespaces.
This add has 0 interraction on existing ACE code.
This sets the groundwork for Step 2. Moving World DB caching to the new models
* first part of the world entity usage
* almost there
* final part
* update WeenieExtensions
* fix
* merge fixes and improvements
* ACE.Database new code
* it compiles
* InitializePropertyDictionaries
* WOrldDatabaseWithEntityCache cleanup
* ShardDatabaseWithCaching
* ShardDatabase Cleanup
* todo
* cache counts reported in serverstatus
* House InitializePropertyDictionaries
* improve ServerStatus
* BiotaModel change HousePermissions to Dictionary<uint, bool>
* PropertiesAllegiance to dictionary
* BiotaUpdater improvements
* Shard Database Cache Reporting
* More code ported from Step 3
* Remove stub CharacterCache
* Update WorldDatabaseWithEntityCache.cs
* build fixes
* code audit
* Remove non-callback functions from SerializedShardDatabase
* BiotaUpdater progress.. only emote left
* Emotes done... now need to test
* fix
* Burden/Value fix for containers
* fat fingered EncumbranceVal
* add some safety
* Don't cache player biotas for initial PlayerManager load
* fix null spellbook
* Add another null check
This is redundant as the check is also upstream.
This is to prevent an exception in the future if this function is called from another source.
There were a ton of commands that worked both on the console, and from a player session.
These commands had conditions like the following to determine if the output should be sent to the console or to the sesion:
if (session != null)
sendToSession()
else
SendToConsole()
CommandHandlerHelper cleans up this.
In addition, there were places in the code that were doing Console.WriteLine that should have been using the logger instead.
* SaveBiota major changes
SaveBiota now only updates values in the database that have changed instead of updating every single value.
In addition. SaveBiota detects added and removed linked entities.
* Replace AddBiota(s) with SaveBiota(s)
* This improves the way a few places referenced the biota
* SaveBiota switched to a diff method. Still some work to do
* More notes + fixes
* SaveBiota move GetBiota to before EnterWriteLock
* Added a note about the lock performance
* More summary improvements for BiotaDatabaseLock
* Thread safety added to the SaveBiotas and AddBiotas functions
SavePlayer also switched to use the SaveBiotas bulk action instead of saving each biota individually.
* Biota.Clone() added
* BiotaExtensions cosmetic only
* DbUpdateException fixed
If there were multiple new records in a collection, the first one was attached but with the last new records values.
This would end up resulting in property records with duplicate types id's.
* ReoveBiota check if biota actually exists in db before removal.
* /databasequeueinfo added
* New From-Weenie Containers should not be searching the shard for inventory
* DeveloperDatabaseCommands removed RequiresWorld flag
* Improved DatabasePerfTest results.
My test results:
Starting Database Performance Tests.
Biotas per test: 1000
This may take several minutes to complete...
1000 individual add . Duration: 29.9 seconds. Successes: 1000, Failures: 0. Average: 30 ms
1000 individual save . Duration: 23.9 seconds. Successes: 1000, Failures: 0. Average: 24 ms
1000 individual remove. Duration: 23.7 seconds. Successes: 1000, Failures: 0. Average: 24 ms
1000 bulk add . Duration: 8.5 seconds. Successes: 1, Failures: 0. Average: 9 ms
1000 bulk save . Duration: 6.2 seconds. Successes: 1, Failures: 0. Average: 6 ms
1000 bulk remove . Duration: 7.0 seconds. Successes: 1, Failures: 0. Average: 7 ms
Database Performance Tests Completed
Next step is to modify the save to detect added/removed entities and only update changed records (not all).