![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 505 Pomógł: 0 Dołączył: 8.01.2005 Ostrzeżenie: (0%) ![]() ![]() |
Witam ponownie,
Biorąc pod uwagę opinie i zalecenia forumowiczów , powstała pierwsza stabilna i oficjalna wersja klasy Chameleon do obsługi szablonów. Na wstęp drobne porównanie z klasą Smarty. Test symulujący całkowite przeładowanie strony z wykorzystanie cache dyskowego. Smarty korzysta ze skompilowanych szablonów , Chameleon z mapy tagów : Smarty : 500 iteracji (20 zmiennych) = 0.3475s Smarty : 500 iteracji (10 zmiennych) = 0.3067s Smarty : 500 iteracji (5 zmiennych) = 0.2965s Chameleon : 500 iteracji (20 zmiennych) = 0.2336s Chameleon : 500 iteracji (10 zmiennych) = 0.2095s Chameleon : 500 iteracji (5 zmiennych) = 0.2105s Kolejny test symulujacy kilkakrotne parsowanie szablonu podczas jednego wywolania strony, sytuacja ma miejsce gdy parsujemy kilkakrotnie ten sam szablon (np. formatka newsa) z zaladowana mapa tagow w pamieci. Oto wyniki : Smarty : 500 powtórzeń (20 zmiennych) = 0.2462s Chameleon : 500 powtórzeń (20 zmiennych) = 0.0981s ---------------- Co potrafi Chameleon : # Cache tagow na dysku twardym # Zmienne typu : {zmienna} {test} # Zmienne tablicowe jednowymiarowe : {tablica[0]} {tablica[1]} # Zagniezdzone IFy dowolnej glebokosci z obsluga negacji oraz ELSE (Narazie warunek sprawdzany jest logicznie tylko czy zmienna jest ustawiona) # Petle szablonowe # Podswietlanie blednych tagow # Proste operacje matematyczne ----------------------------------------------------------
Przyklad 1 : Zmienne zwykle Szablon : http://www.vertis.com.pl/chameleon/example...es/example1.tpl Demo : http://www.vertis.com.pl/chameleon/example...es/example2.php --
Przyklad 3 : Zmienne tablicowe Szablon : http://www.vertis.com.pl/chameleon/example...es/example3.tpl Demo : http://www.vertis.com.pl/chameleon/example...es/example3.php --
Przyklad 6 : Warunki Szablon : http://www.vertis.com.pl/chameleon/example...es/example6.tpl Demo : http://www.vertis.com.pl/chameleon/example...es/example6.php --
Przyklad 7 : Petle w szablonie Szablon : http://www.vertis.com.pl/chameleon/example...es/example7.tpl Demo : http://www.vertis.com.pl/chameleon/example...es/example7.php -- Klasę w wersji 1.0.0 można pobrać z http://www.vertis.com.pl/ Ten post edytował Bastion 18.06.2006, 22:58:47 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 505 Pomógł: 0 Dołączył: 8.01.2005 Ostrzeżenie: (0%) ![]() ![]() |
Kod Slackware Linux / P4 HT 2800MHz / 512MB / ApacheBench, Version 1.3d / php 5.1.2 Kod Cache = 0
Template = tpl_1.html Testing Chameleon 1.1.5 => skipped Testing Chameleon 1.2.0 => 109.90 requests/s Testing Chameleon 1.1.0 CVS => skipped Testing Nemesis 1.3.0b => 156.09 requests/s Testing OPT 1.0.0 RC2 Lite => skipped Testing OPT 1.0.0 RC2 => skipped Testing Savant 2.4.2 => 132.63 requests/s Testing SmartTemplate 1.0.2 => skipped Testing Smarty Light 2.2.11 => 77.96 requests/s Testing Smarty 2.6.12 => 63.13 requests/s Cache = 1 Template = tpl_1.html Testing Chameleon 1.1.5 => skipped Testing Chameleon 1.2.0 => 107.94 requests/s Testing Chameleon 1.1.0 CVS => skipped Testing Nemesis 1.3.0b => 311.20 requests/s Testing OPT 1.0.0 RC2 Lite => skipped Testing OPT 1.0.0 RC2 => skipped Testing Savant 2.4.2 => 130.55 requests/s Testing SmartTemplate 1.0.2 => skipped Testing Smarty Light 2.2.11 => 161.81 requests/s Testing Smarty 2.6.12 => 98.88 requests/s Cache = 0 Template = tpl_2.html Testing Chameleon 1.1.5 => 99.07 requests/s Testing Chameleon 1.2.0 => 94.87 requests/s Testing Chameleon 1.1.0 CVS => 59.17 requests/s Testing Nemesis 1.3.0b => 163.40 requests/s Testing OPT 1.0.0 RC2 Lite => 104.90 requests/s Testing OPT 1.0.0 RC2 => 90.47 requests/s Testing Savant 2.4.2 => 119.71 requests/s Testing SmartTemplate 1.0.2 => 171.23 requests/s Testing Smarty Light 2.2.11 => 127.77 requests/s Testing Smarty 2.6.12 => 73.28 requests/s Cache = 1 Template = tpl_2.html Testing Chameleon 1.1.5 => 97.87 requests/s Testing Chameleon 1.2.0 => 99.16 requests/s Testing Chameleon 1.1.0 CVS => 58.53 requests/s Testing Nemesis 1.3.0b => 271.25 requests/s Testing OPT 1.0.0 RC2 Lite => 106.01 requests/s Testing OPT 1.0.0 RC2 => 114.07 requests/s Testing Savant 2.4.2 => 118.39 requests/s Testing SmartTemplate 1.0.2 => 172.02 requests/s Testing Smarty Light 2.2.11 => 121.85 requests/s Testing Smarty 2.6.12 => 94.82 requests/s Cache = 0 Template = tpl_3.html Testing Chameleon 1.1.5 => skipped Testing Chameleon 1.2.0 => skipped Testing Chameleon 1.1.0 CVS => skipped Testing Nemesis 1.3.0b => 165.93 requests/s Testing OPT 1.0.0 RC2 Lite => skipped Testing OPT 1.0.0 RC2 => skipped Testing Savant 2.4.2 => 133.69 requests/s Testing SmartTemplate 1.0.2 => skipped Testing Smarty Light 2.2.11 => skipped Testing Smarty 2.6.12 => 62.47 requests/s Cache = 1 Template = tpl_3.html Testing Chameleon 1.1.5 => skipped Testing Chameleon 1.2.0 => skipped Testing Chameleon 1.1.0 CVS => skipped Testing Nemesis 1.3.0b => 328.95 requests/s Testing OPT 1.0.0 RC2 Lite => skipped Testing OPT 1.0.0 RC2 => skipped Testing Savant 2.4.2 => 134.05 requests/s Testing SmartTemplate 1.0.2 => skipped Testing Smarty Light 2.2.11 => skipped Testing Smarty 2.6.12 => 102.25 requests/s |
|
|
![]() ![]() |
![]() |
Aktualny czas: 8.10.2025 - 20:15 |