View Single Post
Author Message
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 01-03-2013 , 09:59   Optimize ADT Trie memory usage
Reply With Quote #1

When I create a trie and add a key to it ("valueA") and map the key to a single cell it's using about 8-9 KB of memory. A trie with just one key and a cell value.

Is it technically possible to add a start size (and block size) like with ADT Array? Then I can make tries with short key names (max 32 characters for instance) and customize value block size. Apparently it seems to allocate space for 255 character string values, while I only need to store a single cell. It's a lot of memory wasted if I use many such trie structures.

Even though the memory usage of the plugin will probably stay below 5 MB (which is a lot for a plugin), I'd like a way to set how much space that's allocated for key names and values, if it's possible at all.
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)

Last edited by rhelgeby; 01-03-2013 at 10:12.
rhelgeby is offline
Send a message via MSN to rhelgeby