Civcraft / Citadel

Do not open issues here; open them on the maintained fork @ DevotedMC
https://github.com/DevotedMC/Citadel
BSD 3-Clause "New" or "Revised" License
6 stars 23 forks source link

Speedup cached chunk unloading #98

Closed ttk2 closed 9 years ago

ttk2 commented 9 years ago

Right now Citadel spends a significant amount of DB time dumping its cache on shutdown, from what I understand it saves out cache day to the DB throughout the day anyways, meaning that whatever data that is in the cache that has not been modified since it was last saved out does not need to be sent to the DB on shutdown.

It would be nice to see shutdown speed up by adding 'dirty' var to the cache storage for each entry that is false until the data is modified then set back to false when its unloaded, then you can lazy unload chunks on shutdown with no loss of consistency.

This is a wishlist feature, but it would be nice.

rourke750 commented 9 years ago

https://github.com/Civcraft/Citadel/commit/0f3ecf8bab2bf386e4a67d7be2eed7a049584e99

ttk2 commented 9 years ago

this will need to be tested pretty decently. thanks though.

On Thu, May 14, 2015 at 3:41 PM rourke750 notifications@github.com wrote:

Closed #98 https://github.com/Civcraft/Citadel/issues/98.

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/Citadel/issues/98#event-305246984.

rourke750 commented 9 years ago

It really wasn't too many lines. A code review would be better than s test to make sure I didn't miss anything. On May 14, 2015 6:57 PM, "ttk2" notifications@github.com wrote:

this will need to be tested pretty decently. thanks though.

On Thu, May 14, 2015 at 3:41 PM rourke750 notifications@github.com wrote:

Closed #98 https://github.com/Civcraft/Citadel/issues/98.

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/Citadel/issues/98#event-305246984.

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/Citadel/issues/98#issuecomment-102193921.