Page 1 of 1

FactionAggro in cache & Translations possibility on faction.

PostPosted: Wed Jan 07, 2015 12:50 pm
by Shursan
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 :)

Re: FactionAggro in cache & Translations possibility on fact

PostPosted: Wed Jan 07, 2015 1:22 pm
by HunabKu
Very nice job Ysia as usual ! Thank you

Re: FactionAggro in cache & Translations possibility on fact

PostPosted: Thu Jan 08, 2015 6:31 am
by Leodagan
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 ;)

Re: FactionAggro in cache & Translations possibility on fact

PostPosted: Thu Jan 08, 2015 8:05 am
by Shursan
Perfect leo, do as your wish :)

I will try sooner to provide much update. I like the fact than you check them :)

Re: FactionAggro in cache & Translations possibility on fact

PostPosted: Thu Jan 08, 2015 9:55 pm
by Leodagan
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 :)

Re: FactionAggro in cache & Translations possibility on fact

PostPosted: Fri Jan 09, 2015 12:31 pm
by Shursan
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 :)