View Single Post
Old 03-18-2010, 02:08 PM  
Varius
Confirmed User
 
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
Quote:
Originally Posted by BestXXXPorn View Post
Everything you've written to extend Smarty could have been written more efficiently in PHP ;)

Smarty takes way longer to parse... before people jump my case about it not being noticeable, it's not. However when you manage top 100 alexa sites and you have 100+ machines deployed per colo... Oh man do you notice... Smarty does NOT scale well... not when you reach a certain size...

My main point is that you can do all of those things more efficiently by cutting out Smarty... less hardware resources, cleaner and more readable code base, and you're not introducing... ANOTHER fucking language into the mix...

If you develop third party apps and force other people to use smarty then being shot out back is not enough for you...

The ONLY place I see Smarty used is in the adult space...
I'll agree with you on some other points, like if building a software for sale, many people don't know/use Smarty so it's not a wise choice. I also agree, to my knowledge there are no currently Top 100 sites using it. That doesn't mean much though as I have seen the code of two Top 100 Alexa sites myself and Smarty would definitely be an improvement over the mess they currently have and call 'code'

However on it using WAY more resources I must disagree, once it's been accessed it is compiled and like including any other PHP file. It's actually pretty lightweight as far as template systems go as the majority of load is in the plugins enabled/disabled. While it's caching is not something I'm a fan of, I've seen case studies where people got almost identical results in case studies of large (simulated) load on with Smarty vs. straight PHP.

Also, when you talk about such high load sites, *almost* always their issues stem from poor database query/database structure. I would be quite surprised if an otherwise perfect site suffered in performance due to using Smarty.

In the past, we have also experienced with multiple designers (in-house) that they were able to work with Smarty templates much easier than with standard PHP code. However, in such a situation we taught them the basics of Smarty and attempted to use only a limited amount of Smary functions in the templates to not overwhelm them.
__________________
Skype variuscr - Email varius AT gmail
Varius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote