> > do a Rose call and then iterate through all the objects creating a > > hash? I've now written something to do this. > > Pretty much, yes. > Some of it is done via rose + a loop, but much is done via generic > sql queries too. > my applications are only ~50% rose > fwiw, i also do this: ( completely not rose related ) > > for (k,v) in objects: > hash{'id'}{ $key } = $value > hash{'name'}= reverse $MyApp::Config::fieldname{'id'} > > ( which works, because all the related tables have name > as unique )
Hmmm.. I see. Intriguing, thanks. > I develop under mod_perl -- so on startup i connect to the db, pull > all the 'static' info , and toss that into a series of hashes in a > MyApp::Config namespace. That info is then available to all the > other modules after apache forks. > I don't keep complex data in there - 90% of it is just key/value > pairs: states, dropdown select options, etc. maybe 50k worth of > stuff ( in terms of apache bloat ) -- but its all stuff that never > changes and there'es a 80% chance that a mod_perl child would have > requested it several times by termination , so i trade memory for > fewer db calls. So when you say "startup", does this mean upon Apache startup or upon your script startup? I can see that if it's in Apache's memory before a script even runs, that would be hugely performance enhancing. > if you're under mod_perl, it might make sense to play around > with the > cache version of rose objects. Regretfully not. Although I use Apache, PERL & MySQL, it's all on Windows; Maybe I just enjoy pain. Mod Perl sounds very tempting but doesn't sound like it works too well with win32; Had enough trouble getting Rose working on win32 - spent days on it! ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object