laplace's demon

Uncategorized

Zend Framework 2 Sample Application

by 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

Leave a Comment more...

Zend Framework 2 comparison

by 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.

Leave a Comment : more...

How to remove require_once statements in Zend Framework on Mac

by on Jan.13, 2012, under Uncategorized

Since autoload does the work, no need to keep the backward compatibility mode of Z

Leave a Comment more...

Stupid windows drives me crazy

by 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

Leave a Comment more...

Don’t buy from slicehost if you’re in Turkey

by 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.

3 Comments more...

Geek talk

by on Apr.23, 2011, under Uncategorized

I just like that sense of humor

Source: http://xkcd.com

Leave a Comment more...

Twitter Updates

by 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.

1 Comment more...

Macbook Pro Liquid Incident

by 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.

Leave a Comment more...

Adding Colors to VIM

by 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
Leave a Comment more...

Terminal Bash Renkleri

by 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"
Leave a Comment : more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...