WyCnet;11007389 wrote:
It matters, because Service Providers have
NogDog;11007407 wrote:
I guess my main thought here is to be careful about eschewing generally perceived
Exactly my point of view NogDog. Somewhere earlier I said something about that "when/if" you have performance issues which warrant a specific approach (e.g. such as not using separation of logic from layout if that would actually mean a performance gain which I doubt) that's when you start doing it, not before. Using scalable algorithms on the other hand is usually a good idea to do to begin with since they will otherwise quickly deteriorate performance, while using them usually will not at all hinder maintenance. Anyway, in your above statement you once again say something as if it's a set rule rather than a common guideline for some user scenarios or even possibly common user scenarios (where user is you/your service, not your end users): "Service Providers have".
Our service providers doesn't have anything like that, at least not for us. I don't remember if we used to pay for 50Mbps max (with allowance for limited peaks above it) and raised the roof to 100Mbps after we introduced video upload and streaming, or if we went from 100 to 150 Mbps. It doesn't matter how or when our end users connect to our servers, they will get their stuff. If we surpass the "peak limit" (which isn't really a limit) everything still works as before. But should we start pushing our average above it or even staying above it for extended periods of time, we'd have to renegotiate our deal with them.
As for large chunks or not, as pointed out several times, the last by Weedpacket's emphasis, as well as implicitly by NogDog's mention of how they user Smarty templates: Seprate program logic from layout and output. You can still output everything at once if you wish. Or if you have can't get around processing for a long time (from user perspective) do as little as you can to give them a decent amount of stuff sent to them in the logic layer, then user the layout/display layer to send that stuff to them (in one large chunk) so they know something is happening, eventually followed by one or more large chunks. Not to speed things up or slow them down, but to provide users with what they need to feel satisfied.
As for Smarty, I've heard PHP developers complain about it being slow, and we also use it for one community site with 2k - 10k concurrent users around the clock running on 3 web fronts (and still managing on one should needs be), and never have had any issues with Smarty performance.
- Writing optimized SQL is an issue (data layer)
- Keeping proper DB indexes is an issue (data layer)
- Memcaching the right stuff to reduce DB load is an issue (data layer)
- Caching parts of pages using smarty to reduce load on the DB (and memcache although that's not the point here) is an issue (data layer)
- Preprocessing ads every so often to keep them cached on disk rather than doing the work on every page request is an issue (data layer)
Smarty works fine. Its performance is no issue. Wether we send pages in one go or in chunks doesn't matter. And also note that we can still use Smarty (template enging) without achieving separation of data layer and program logic from display. Smarty is one way of facilitating the separation, but you can do it in any number of ways. And even with tools to facilitate that separation, you can still "achieve" not seprating them if you don't know how to or if you really wanted not to.
One single large output doesn't really have anything to do with anything else. Just like separation of logic and layout has nothing to do with anything else.