Trevor said &gt;  <span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">However, I hesitate to even point that out since logic in the config file is probably a bad idea as was pointed out. If you&#39;re hash of all possible options is not super big (megabytes) I&#39;d just go that route and not worry about the memory. You may be optimizing prematurely.</span><div>
<span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Michael said &gt; </span><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">How many config variables are we talking about? If it&#39;s less than a thousand I doubt you&#39;ll event notice the memory usage.</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">I totally acknowledge that it&#39;s probably not a good idea, but it would simplify things for me a bit..  Hash would as well (copy pasting, instead of editing a ton of different files)..</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">The variables are all 8digit hex color codes, there are about 26 vars that I&#39;m expecting to grab from the config file (in hash scenario, would be 26 members), and currently 19 different possibilities, will be 50 by the end of the month, and I expect it to grow as themes/ROMs/probably devices are added later.</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">This whole thing takes place on a web server (including zipping, running binaries to zipalig, and decompile some components), where I KNOW I have a very limited amount of memory (256 with 384 burst, iirc), not to mention there could be 50 people trying to run this at the same time.. :P  (Maybe not now.. but in theory).</span></font></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; ">From the numbers, the variables are pretty insignificant... ;P</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; "><br>
</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; ">Thanks for the example code Mike, from it I did find what I was doing wrong last night... and got require working...</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; ">And Michael for the article... In my case, this will sit on a webserver and users will never touch the config file... It&#39;s for me.</span></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">The script is for android theming...</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Currently, I have working a &#39;require&#39;, with 2 files.  one holds info on the ROM (the stuff on the phone), and one holds info on the theme that the user selected to apply.  The vars in each are compared, and if they don&#39;t match up, then the file that holds that text is modified and marked for inclusion (that&#39;s essentially how it works, anyway).</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">I&#39;d have to re-work a good bit of the script if I change over to hash, so I&#39;ll add it to my todo list, but it works well now.  thanks again!</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">-John</span></font></div>