44 - Savant VS Smarty rss

Karena penasaran.. Sy buat test kecil, sederhana & menyenangkan hati.. :D

Test #1 (dilakukan di komputer sendiri)
test @ ibook G4 1,33Gz, 512MB
System: Darwin bonny-hardi-putras-ibook-g4.local 8.5.0 Darwin Kernel Version 8.5.0: Sun Jan 22 10:38:46 PST 2006; root:xnu-792.6.61.obj~1/RELEASE_PPC Power Macintosh
Apache: Apache/2.0.55 (Unix) PHP/5.1.2 DAV/2 mod_ssl/2.0.55 OpenSSL/0.9.7i
PHP: PHP Version 5.1.2

Hasil nya:

#1. Savant
source: Savant ver 3 (212kb)
script: books.php + books.tpl.php (8kb)
test script (microtime):
1. 0.0897588729858
2. 0.0307579040527
3. 0.143805027008
4. 0.0693700313568
5. 0.138143062592
6. 0.070867061615
7. 0.140266180038
8. 0.156144857407
9. 0.0838990211487
10. 0.0789890289307
#2. Smarty
source: Smarty 2.6.12 (492kb)
script: books.php + books.tpl (8kb)
test script (microtime):
1. 0.600517988205
2. 0.12530708313
3. 0.0538609027863
4. 0.118382930756
5. 0.150074005127
6. 0.137119054794
7. 0.107515096664
8. 0.171481132507
9. 0.128958940506
10. 0.0636899471283

Test #2 (dilakukan di server ini)
test @ this server
System: Linux **sensor ya*** 2.4.21-20.EL.c0smp #1 SMP Thu Sep 9 01:53:25 EDT 2004 i686
Apache: ** sensor lagi hehehe **
PHP: PHP Version 4.4.2
Hasilnya:

#1. Savant
source: Savant ver 2.4.2 (220kb) [gara php4]
script: books.php + books.tpl.php (8kb)
(ada beda script dikit)
test script (microtime):
1. 0.003439
2. 0.003404
3. 0.00344
4. 0.003442
5. 0.003451
6. 0.003449
7. 0.003425
8. 0.003464
9. 0.003436
10. 0.003433
#2. Smarty
source: Smarty 2.6.12 (492kb)
script: books.php + books.tpl (8kb)
test script (microtime):
1. 0.027888
2. 0.006145
3. 0.005758
4. 0.005837
5. 0.005745
6. 0.005815
7. 0.005744
8. 0.005842
9. 0.005828
10. 0.005837

Klik untuk coba script: #1 Savant vs #2 Smarty
Script sy buat se identik mungkin.. test ini belum optimal, krn sy belum coba menggunakan source & data yang besar.. :D (udah cape pengen pulang nih.. hehehe)

Semoga test ini sebagai masukan.. untuk memilih template mana yg lebih baik.
*kesimpulannya dibuat sendiri2 aja yah.. untuk smarty microtime pertama lebih lama dari yg setelahnya.. karena Smarty meng-compile terlebih dahulu.

Nah.. kalo mau dowload script source nya (.zip): #1 Savant vs #2 Smarty


5 Comments »

RSS feed for comments on this post. TrackBack URI

  1. Yang sering gk dimasukkan penilaian dalam mempetimbangkan template engine: designer friendly.

    Template tidak hanya dipakai untuk menjawab isu pemisahan display dan non display layer. Tapi template juga sering dipakai untuk melakukan paralelisasi kerja. Oleh karena itu saya suka banget klo templatenya designer friendly.

    Dulu sempat maniak sama smarty tapi klo sekarang saya malah lebih condong ke PatTemplate. Meski kadangkala agak ribet dengan tagnya, tagnya HTML friendly (setelah diset ke model comment tag) ;)


    Comment by toni — February 25, 2006 #
    Using Konqueror Konqueror 3.5 on Linux Linux

  2. Gimana kalo savant di coba tanding dengan patTemplate ? :d ditunggu review nya yak… :d

    http://www.php-tools.de/


    Comment by aris — February 25, 2006 #
    Using Firefox Firefox 1.5.0.1 on Linux Linux

  3. so, what is the conclusion and your recommendation ?


    Comment by udhien — February 27, 2006 #
    Using Firefox Firefox 1.5.0.1 on Windows Windows XP

  4. thx toni,aris & udhien..
    kalo banding-in dari kedua script itu..masih belum yakin juga. soal nya belum di coba pake script yg kompleks dan data yg banyak.. :D

    inti dari searching2 sih.. pake smarty kalo kita ga percaya sama org2 yang mengolah tampilan (view logic).. tapi kalo kita sendiri sebagai developer nya mendingan pake savant.. mmmm… iy gitu.. baru sedikit coba savant :D

    pake savant apa bedanya pake include() & extract().. :-w (mesti banyak belajar lagi nih. hehehe)


    Comment by BonnyHP — February 27, 2006 #
    Using Firefox Firefox 1.5.0.1 on Mac OS Mac OS X

  5. ide bagus juga tuh dijadiin skripsi…
    gimana kalo savant vs tbs (tiny but strong) ??
    website :www.tinybutstrong.com


    Comment by ams — May 7, 2008 #
    Using Internet Explorer Internet Explorer 6.0 on Windows Windows XP

Leave a comment

:) :( :d :"> :(( \:d/ :x 8-| /:) :o :-? :-" :-w ;) [-( :)>- more »