FactionAggro in cache & Translations possibility on faction.

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

FactionAggro in cache & Translations possibility on faction.

Postby Shursan » Wed Jan 07, 2015 12:50 pm

Heya,

This patch allow language support on factions name.
It also make all FactionAggro in cache for appraise database hits during player save. (we save 500 players in a short time with this)
It also solve a rare errors during itinerations on player save.

Feel free to apply :)
Attachments
FactionaggroCache + Translations.patch
(21.66 KiB) Downloaded 25 times
Origins/Genesis Administrator
Shursan
Server Representative
 
Posts: 375
Joined: Mon Jun 22, 2009 8:25 pm
Location: France

Re: FactionAggro in cache & Translations possibility on fact

Postby HunabKu » Wed Jan 07, 2015 1:22 pm

Very nice job Ysia as usual ! Thank you
"C'est l'ignorance qui apporte le chaos, pas la connaissance."
Scarlett Johansson dans "Lucy" de Luc Besson
-------------------------------------------------------------------------------
"Ignorance brings chaos, not knowledge."
Scarlett Johansson on "Lucy" by Luc Besson
User avatar
HunabKu
Developer
 
Posts: 1905
Joined: Sat Jun 18, 2011 4:48 am

Re: FactionAggro in cache & Translations possibility on fact

Postby Leodagan » Thu Jan 08, 2015 6:31 am

Thanks Ysia,

I'll try to review and merge these changes with DOL Core during the Week ;)

I read the patch quickly it's seems good to me except some part toward the end where there are "typecast" with "as" keyword, but no "null check" afterward ;)

And I'll probably take the liberty of changing "Specialized Collection" (Hashtable) for "Generics Collection" (Dictionary<TKey, TVal>), which should reduce boxing and unboxing of Objects ;)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: FactionAggro in cache & Translations possibility on fact

Postby Shursan » Thu Jan 08, 2015 8:05 am

Perfect leo, do as your wish :)

I will try sooner to provide much update. I like the fact than you check them :)
Origins/Genesis Administrator
Shursan
Server Representative
 
Posts: 375
Joined: Mon Jun 22, 2009 8:25 pm
Location: France

Re: FactionAggro in cache & Translations possibility on fact

Postby Leodagan » Thu Jan 08, 2015 9:55 pm

On second thought there is a lot of things bothering me in there ;)

You're caching a table that is a relation between player and their aggrolevel to each faction, virtually this table can get pretty huge as the player history grows !

That's not the same trouble than Inventory Table can be but it's the same type of data growing with player count, we can afford to cache most tables that are only "settings" or "constant data" like objects/skills/location/properties/quests etc, but it's a pretty bad idea to fully cache a table linked with character records !

If your database hold 100 000 players but only 10 of them are playing at a time you waste memory :)

This cache should only load when player connect to game, and unload when they log out, and it will be way more efficient than actual behavior without adding too much memory usage :)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: FactionAggro in cache & Translations possibility on fact

Postby Shursan » Fri Jan 09, 2015 12:31 pm

Good leo, i have review our code to act as you say.

Using PlayerEnterExit event for load/unload records.
we will test it tuesday and will send you the new patch :)
Origins/Genesis Administrator
Shursan
Server Representative
 
Posts: 375
Joined: Mon Jun 22, 2009 8:25 pm
Location: France


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest