Allow arenas to share map and lvzs in memory

Issue #38 new
Former user created an issue

Copied from bug number 13 in old bug database.

grelminar: notes from TODO:

the implementation is pretty easy. let mapnewsdl keep a global hash table mapping lvl/lvz filenames to structs with: a refcount, a crc32, and a pointer to the prepared big packet. then arena structs can keep references to the treap nodes, and the treap counts as one reference too. when the refcount drops to one, you can decide whether to keep the thing in memory or free it. maybe mark it with a timestamp and then have a timer clear out things that have been unused in one hour (or another suitable timeout).

complications: what about recyclearena after uploading a map? or any other case of the map file changing while the server is running.

possible solution: hash filename + mtime + size, instead of just filename.

Comments (0)

  1. Log in to comment