From: Eloi G. <el...@re...> - 2003-05-01 20:07:20
|
Wow. You got on that immediately. Every day you find more ways to impress me! > Some of the reasons you are seeing all these extra SQL calls is that we > received another warning a few months ago. > > That warning was that we were using far too much memory. So we reduced the > dependance on the GLOBALS array. Yes, but I thought the warning was more about -duplicate- information being stored. > So the question is, which is it? Do we want to depend upon the database > each time to get our information? Or do you want offload some of the work > by storing results in GLOBALS? I personally feel that the DB always needs to be treated as a bottleneck by encapsulating the work to be done in each - the DB should handle ordering & filtering and the accesses should be as gross or greedy as possible. All other manipulation should be done on the front end. All data retrieved should be freed from memory as soon as it's not needed - if I query data and fetch_ it into an array and then pass it by value to another function to write to other variables, then there's probably 3 or four copies of the data hanging around before the PHP compiler starts garbage collection. Others may feel different, so I agree with your choice to let us select our method in the cache config. > Now that we know that classes eat up most of the memory, we may decide to > place some data back and reduce DB calls. That'd be great! -Eloi- |