I have written a module that writes views programmatically, and my mymodule.views_default.inc file is enormous. Currently there are 150 individual views, and 780 will be the target (this is the initial target).
But, even with the test group of 150 several things are happening.
1) when enabling the module via drush, php memory usage goes through the roof. It climbs into the gigs (TOP command), but it finally loads.
2) but, when I then try to view the site I get WSOD, and the top command shows apache2 climbs into the gigs for memory usage until the Apache process actually crashes. Of course there is not enough memory to load it, and it's of course unrealistic to put php memory limit in the gigs.
What's going on here? How is the code in mymodule.views_default.inc actually handled once it's loaded? Where is it being loaded to? Is it loaded into memory for each Apache process? If I can actually get it loaded will my Apache process footprints actually shrink back down to something normal (they were around 60M before)?
Can this file be divided up into individual files, and would this even help? Is it better to someway put them into the database instead of using the file at all?
In other words, how can I get almost 1000 views loaded and continue doing business as usual?
note, if you are curious, this is a census data project. I don't want to use filters or arguments as each set of data needs to to have its own individual page URL and other criteria unique to that data set.
I'm developing on a LAMP stack - ubuntu, 8 gigs of ram, mod_php