inevity / cacheboy

Automatically exported from code.google.com/p/cacheboy
0 stars 0 forks source link

large memory objects chew CPU #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Large memory objects chew CPU as the storeClientRef() / storeClientCopy()
API uses an offset which is seeked into the memory object each call.

Modify the stmem code to store an "offset" pointer in each mem_node which
indicates the offset in the object which that mem_node begins at.

Modify the store client to keep a reference to the last ref'ed mem_node and
use that as a starting point for the list walk if the required offset is
greater than the beginning offset of that mem_node.

This is a hack but it should substantially reduce the CPU taken on large
memory objects and should suffice until a replacement storage layer is written.

Original issue reported on code.google.com by adrian.c...@gmail.com on 17 Apr 2008 at 4:04

GoogleCodeExporter commented 9 years ago

Original comment by adrian.c...@gmail.com on 30 Apr 2008 at 6:00