PHP Developer / Blog

Posts Tagged ‘efficiency’

Keeping third party JavaScript from slowing down your site

Saturday, May 31st, 2008

All too many times I go to a blog or website and half of the page loads. Then it sits there waiting while a JavaScript file from another site loads. Some JavaScript cannot be placed at the bottom of the DOM because they use document.write(). It’s unrealistic to expect everyone to abandon third party sites (I use a script from Photagious for the photos on the right). But is there anything we can do to make them at least appear to load faster? (more…)

Asynchronous/parallel HTTP requests using PHP multi_curl

Thursday, May 29th, 2008

When working with web services curl quickly becomes your best friend. It gets even better when you dig into PHP’s multi_curl functions. The downside to accessing web services at run time is that HTTP connections can be slow. This problem is multiplied when you have to call multiple web services for a given page. PHP’s multi_curl_* functions help drastically because they allow you to make unblocking asynchronous/parallel requests. This means you can continue processing the request without waiting for a response. (more…)

A faster way to do curl put calls in PHP

Wednesday, April 23rd, 2008

In a previous post I suggested using PHP’s memory stream to pass data along with PUT calls in curl. After doing some benchmarking it turns out that it’s faster to use PHP’s CURLOPT_CUSTOMREQUEST option. This way you can treat PUT and POST calls in the same manner. (more…)


About this site:
This is my (Jaisen Mathai) personal site for potential employers who want to see my resume or portfolio. My ideal job would be to work as a PHP developer on a large scale consumer website. My experience is in using PHP, MySQL, Ajax and JSON. I really enjoy creative brainstorming...taking a problem apart and narrowing 100 solutions down to the best one.

Thanks for stopping by. Be sure to drop me a line.