[VPM] - data structures, performance and memory

Jer A jeremygwa at hotmail.com
Thu Nov 9 20:34:26 PST 2006


hi all perl gurus,

I am working on two projects where I can use some of your advice.

project 1: I am volunteering for a non-profit organization putting a printed 
"information directory" on their website. It will consist of a search 
engine, and an Index of categories, where one can narrow down, and browse, 
if they do not wish to do a search. Due, to funding and other restrictions, 
they cannot host an sql database, xml or webservices, as they use SHAW 
hosting, So I will be doing this project using a flat file approach. should 
I use many small flat files, or one big one? should I make a filesystem 
directory for each catagory? or how can i associate keywords with the data 
to be searched? What can i do to make this search engine as fast and 
efficient as possible?

project 2: I am working on a project where I need to store data in memory. 
What are the memory requirements of certain structures eg. hash,array,array 
of anon hashes,array of packed data,array of strings, array of objects etc.

suppose I have a hundred records (structures) holding eg. age,name,address 
etc. what is the best way of storing this data live in memory for a long 
period time, for performance and efficiency.
An array of anon hashes is pretty, but may not be the best for performance, 
and mem usage...am i right? Considering this, how can I store records with 
elements that can be of different record types, saving the most amount of 
memory as possible......can I do this with pack and unpack, I am not 
familiar with this, but do you think s more efficient, than an array of 
element delimited strings? or what if each record is an instantiated object 
with properties?

Thanks in advance for your advice and help.

  -Jeremy A.

_________________________________________________________________
Ready for the world's first international mobile film festival celebrating 
the creative potential of today's youth? Check out Mobile Jam Fest for your 
a chance to WIN $10,000! www.mobilejamfest.com



More information about the Victoria-pm mailing list