mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-03 03:50:40 +00:00
[Performance] Character Save Optimizations (#4851)
This commit is contained in:
@@ -995,6 +995,8 @@ bool Client::Save(uint8 iCommitNow) {
|
||||
if(!ClientDataLoaded())
|
||||
return false;
|
||||
|
||||
BenchTimer timer;
|
||||
|
||||
/* Wrote current basics to PP for saves */
|
||||
if (!m_lock_save_position) {
|
||||
m_pp.x = m_Position.x;
|
||||
@@ -1022,6 +1024,8 @@ bool Client::Save(uint8 iCommitNow) {
|
||||
m_pp.endurance = current_endurance;
|
||||
}
|
||||
|
||||
database.TransactionBegin();
|
||||
|
||||
/* Save Character Currency */
|
||||
database.SaveCharacterCurrency(CharacterID(), &m_pp);
|
||||
|
||||
@@ -1105,6 +1109,10 @@ bool Client::Save(uint8 iCommitNow) {
|
||||
database.botdb.SaveBotSettings(this);
|
||||
}
|
||||
|
||||
database.TransactionCommit();
|
||||
|
||||
LogInfo("Save for [{}] took [{}]", GetCleanName(), timer.elapsed());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user