Uncategorized
Zend Framework 2 Sample Application
by solomon on Jan.24, 2012, under Uncategorized
I am planning to use ZF2 on my future projects and porting my ZF1 library to it. Just to see how it’s like, I created a sample project. Hope that it helps someone who try to do it as well.
https://github.com/laplacesdemon/ZendFramework2-Sample-Application
Zend Framework 2 comparison
by solomon on Jan.19, 2012, under php, Uncategorized
I’ve been using Zend Framework 1.x for quite a long time. It is a stable framework with a lot of features. But I always have some performance issues in terms of memory/cpu usage and page load time. I have looked at the new version of Zend Framework which is under active development. As my first impressions, I have astonished by their new design. Removing require_once statements, using namespaces and lazy loading of components should boost the performance drastically. In addition, the new module system will be very flexible especially for 3rd party component developers.
To see it in action, I have decided to do a quick benchmark. I have used the zf2 skeleton application, and my current zend framework 1.11 setting which I use in any of my PHP projects. The comparison is totally subjective and the aim is to have an overall impression.
I have used the apache benchmarking tool. The number of requests are 100 and the concurrency level is 5.
ab -c 5 -n 100 http://myUrl
Here are the results
Zend Framework 2
Server Software: Apache/2.2.20
Server Hostname: localhost
Server Port: 80
Document Path: /zf2-sample/public
Document Length: 351 bytes
Concurrency Level: 5
Time taken for tests: 0.214 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Non-2xx responses: 100
Total transferred: 61900 bytes
HTML transferred: 35100 bytes
Requests per second: 466.58 [#/sec] (mean)
Time per request: 10.716 [ms] (mean)
Time per request: 2.143 [ms] (mean, across all concurrent requests)
Transfer rate: 282.04 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 10 6.3 11 33
Processing: 0 1 2.6 0 15
Waiting: 0 0 2.6 0 15
Total: 1 11 6.1 11 33
Percentage of the requests served within a certain time (ms)
50% 11
66% 12
75% 13
80% 14
90% 16
95% 23
98% 32
99% 33
100% 33 (longest request)
Zend Framework 1.11
Server Software: Apache/2.2.20
Server Hostname: localhost
Server Port: 80
Document Path: /ad
Document Length: 336 bytes
Concurrency Level: 5
Time taken for tests: 0.410 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Non-2xx responses: 100
Total transferred: 58900 bytes
HTML transferred: 33600 bytes
Requests per second: 243.98 [#/sec] (mean)
Time per request: 20.494 [ms] (mean)
Time per request: 4.099 [ms] (mean, across all concurrent requests)
Transfer rate: 140.33 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 20 14.7 16 53
Processing: 0 1 3.6 0 28
Waiting: 0 1 3.5 0 28
Total: 1 20 14.4 17 53
Percentage of the requests served within a certain time (ms)
50% 17
66% 29
75% 33
80% 34
90% 40
95% 46
98% 51
99% 53
100% 53 (longest request)
Conclusion: New version of Zend Framework is nearly double times faster that the current version.
How to remove require_once statements in Zend Framework on Mac
by solomon on Jan.13, 2012, under Uncategorized
Since autoload does the work, no need to keep the backward compatibility mode of Z
Stupid windows drives me crazy
by solomon on Jan.10, 2012, under Uncategorized
My father has just called me and complained that he couldn’t connect to the wireless network at home. Since I’ve solved the problem before, I started to explain. The wireless network name in my house and theirs is the same, but obviously passwords are different, and windows isn’t clever enough to ask it again when changing the location. I don’t mind windows has some bugs but this should not be a big deal.
At the end, I’ve spend like 30 mins on the phone trying to figure out windows menus (I don’t have windows, so I need to stick with him). While I was talking with him I’ve researched about the problem and saw that there is actually a screen called “Manage wireless networks”. I directed him to that menu but apparently it wasn’t there. Then he searched for the menu, nope, won’t help. Then he somehow found the
Don’t buy from slicehost if you’re in Turkey
by solomon on Jan.10, 2012, under Uncategorized
Basically it is cheap’n shitty. this blog is served on a server on their system. As you see it is bloody slow. I even struggle to write this post and there is always a possibilty to request timeout while posting it, thankfully wordpress saves the posts as drafts so I loose no data.
I am looking for a new server
I recovered this post from my drafts, dammit, I can’t even submit my posts.
Twitter Updates
by solomon on Feb.08, 2011, under Uncategorized
I guess it would be kinda cool if my posts are published as twitter entries. I have installed a new plugin. And this is my first post to test it out.
Macbook Pro Liquid Incident
by solomon on Oct.02, 2010, under Uncategorized
Recently, a fair amount of tea has been poured over the keyboard of my macbook pro. And after a few hours, the keys got sticky. I had try to go for a keyboard replacement but it turns out to be very expensive procedure and it will take some time. Then I have found the following video explains the replacement of a macbook key.
Adding Colors to VIM
by solomon on Aug.29, 2010, under Uncategorized
I was not happy with default settings of the vim editor on snow leopard. Following are my settings. So far i don’t have a problem with them. Just put in a file named .vimrc on home folder.
set nocompatible set selectmode=mouse set backupdir=/tmp set directory=/tmp set guifont=Lucida_Console:h8 set guioptions-=T set errorfile=/tmp/vim.errors.log set ic set fileformats=dos,unix,mac highlight StatusLineNC guifg=#ff0000 guibg=#000000 highlight StatusLine guifg=#00ff00 guibg=#000000 set hls hi Normal guibg=black guifg=white hi Search guibg=white guifg=black hi IncSearch guibg=white guifg=black set mousef set tabstop=2 syntax on
Terminal Bash Renkleri
by solomon on Jul.16, 2010, under Uncategorized
Mac bilgisayarımda command prompt rekleri olarak aşağıdaki olayı kullanıyorum
export PS1="[\e[0;32m\]\W\e[m]\[\e[0;31m\] > \e[m\]"
Directory renklendirmesi içinse ~/.bash_profile dosyası içine
export CLICOLOR=1 export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
iş yerinde ise “ubuntu” kullanıyorum. oradaki renk kodlarımı ise sonra yazıcam. evet evdeyim şu anda
Edit: Bash renklerimi değiştirdim. Yenisi aşağıda
export PS1="[\e[0;32m\]\u@\H \e[0;36m\w\e[m]\[\e[0;31m\] > \e[m\]" export CLICOLOR=1 export LSCOLORS="DxGxFxdxCxdxdxhbadCxCx"
