Kevin Waterson wrote:

This one time, at band camp, Tom Rogers <[EMAIL PROTECTED]> wrote:



php can output the stream without having to save it to a file first if
that is what is worrying you.


That was sorta my concern, but not so much as a file, does it copy to
memory anywhere, or, is it a direct stream to the browser?


Well, you're making a few copies doing it through PHP. Or possibly just one. When PHP fetches it from the DB, it's stored in a variable (and the data *may* be stored in an intermediate form by the PHP internals, but I certainly don't know for sure. My gut says that it is, though.). Then you output it to the browser.


Yes, this is somewhat inefficient, but the only way I can think of to make it more efficient would be to make the images files and have the webserver send them directly. I suppose this terraserver might be able to "stream" the data as it gets it from the DB server, but it's still makign a copy. It just happens to be very small pieces of the image, outputted as they get to the server. While this is kinda cool, it seems a bit too far to go for normal applications. If you're worried this much about speed, you shouldn't be storing the images in the DB in the first place. Storing them as files will nearly always be faster than any other method (unless you've cached them in RAM somehow ;-).


-- paperCrane <Justin Patrin>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to