in reply to Re: tuning hash memory usage
in thread tuning hash memory usage

3) Remove all unneeded data. If all you need is a list of search/replace information and file names, but you also have dates, file sizes and other 'useless' information then get rid of it and then write functions to get that information from what you are storing in memory.

Yes, a good tip. I've found that changing some flags (is_this_type_of_content, is_that_type etc.) from setting their default value explicitly, so instead undef is used as the default value, saves a lot of memory -- as the key and value just don't have to be set at all for this to work.

I think I'll have to serialize the dependencies array into something much smaller, probably using (at the easy end) a serialize-into-string trick and (at the heavier end) some kind of Flyweight-pattern-style trickery.