-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
CatCacheCopyKeys has this:
/*
* XXX: memory and lookup performance could possibly be improved by
* storing all keys in one allocation.
*/
That seems like a good idea. We'd like to reduce backend memory usage. This is a very small part of it, but it's also a very localized change.
Also, this function often deals with the 'name' type. 'name' is a fixed-width type, 64 bytes wide (NAMEDATALEN to be precise). However, it's always null-terminated, and the functions in catcache.c like nameeqfast and namehashfast treat it as a C string. So we don't really need to alloc and copy the whole 64 bytes, we could call strlen() here and leave out the trailing zeros.
Tasks:
- Create a test case that shows the benefit. Something that creates a lot of catcache entries, and measure the memory usage.
- Do the above optimizations
Metadata
Metadata
Assignees
Labels
No labels