<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP extension for Cairo graphics library</title>
	<atom:link href="http://www.sitepoint.com/blogs/2006/09/05/php-extension-for-cairo-graphics-library/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2006/09/05/php-extension-for-cairo-graphics-library/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<lastBuildDate>Mon, 23 Nov 2009 05:23:27 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: All in a days work&#8230;</title>
		<link>http://www.sitepoint.com/blogs/2006/09/05/php-extension-for-cairo-graphics-library/comment-page-1/#comment-125606</link>
		<dc:creator>All in a days work&#8230;</dc:creator>
		<pubDate>Thu, 14 Dec 2006 01:30:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1704#comment-125606</guid>
		<description>[...] PHP extension for Cairo graphics library GD should be deprecated and put into pecl. The quality of some of its drawing primitives arenâ€™t that good. And the amount of effort to get it up to scratch seems wasted when there are existing usable apiâ€™s out there. (tags: PHP Cairo) [...]</description>
		<content:encoded><![CDATA[<p>[...] PHP extension for Cairo graphics library GD should be deprecated and put into pecl. The quality of some of its drawing primitives arenâ€™t that good. And the amount of effort to get it up to scratch seems wasted when there are existing usable apiâ€™s out there. (tags: PHP Cairo) [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.sitepoint.com/blogs/2006/09/05/php-extension-for-cairo-graphics-library/comment-page-1/#comment-120996</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Sun, 10 Dec 2006 01:20:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1704#comment-120996</guid>
		<description>I have used both Imagemagick, and GD. I agree Imagemagick is powerful but it is also slow and resource hungry compared to the GD library. I think to deprecate GD would be a major step backwards for PHP. If thread safe is what you want need then disable GD on your own installation.</description>
		<content:encoded><![CDATA[<p>I have used both Imagemagick, and GD. I agree Imagemagick is powerful but it is also slow and resource hungry compared to the GD library. I think to deprecate GD would be a major step backwards for PHP. If thread safe is what you want need then disable GD on your own installation.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: patrikG</title>
		<link>http://www.sitepoint.com/blogs/2006/09/05/php-extension-for-cairo-graphics-library/comment-page-1/#comment-53047</link>
		<dc:creator>patrikG</dc:creator>
		<pubDate>Sat, 09 Sep 2006 11:02:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1704#comment-53047</guid>
		<description>&lt;blockquote&gt;That leads to some depressing conclusions.&lt;/blockquote&gt;

Indeed, but Rasmus has spelled &lt;a href=&quot;http://www.zend.com/zend/week/week266.php#Heading5&quot; rel=&quot;nofollow&quot;&gt;them out&lt;/a&gt;(12 Dec. 2005)
&lt;blockquote&gt;Bart de Boer went ahead anyway and asked whether there are any future plans for native multithreading support in PHP?
Rasmus denied it, saying that asynchronous mechanisms offer a more efficient approach. Bart clarified this - by &#039;asynchronous mechanisms&#039;, did Rasmus mean calling other scripts, such as web services, from within the main script? He&#039;d regard that as a good alternative, apart from the extra overhead, scripts and code... &lt;/blockquote&gt;

It&#039;s an answer just as cryptic as you&#039;d expect from the Oracle at Delphi (not the IT-stuff, but Greek mythology). Why would and how could webservices make up for PHP extensions? GD-library via webservices? Did some more research and at some point my head started spinning with acronyms and comparing concepts I knew not too much about at all. Then decided to think &quot;What an interesting discussion&quot; and have a cup of tea.</description>
		<content:encoded><![CDATA[<blockquote><p>That leads to some depressing conclusions.</p></blockquote>
<p>Indeed, but Rasmus has spelled <a href="http://www.zend.com/zend/week/week266.php#Heading5" rel="nofollow">them out</a>(12 Dec. 2005)</p>
<blockquote><p>Bart de Boer went ahead anyway and asked whether there are any future plans for native multithreading support in PHP?<br />
Rasmus denied it, saying that asynchronous mechanisms offer a more efficient approach. Bart clarified this &#8211; by &#8216;asynchronous mechanisms&#8217;, did Rasmus mean calling other scripts, such as web services, from within the main script? He&#8217;d regard that as a good alternative, apart from the extra overhead, scripts and code&#8230; </p></blockquote>
<p>It&#8217;s an answer just as cryptic as you&#8217;d expect from the Oracle at Delphi (not the IT-stuff, but Greek mythology). Why would and how could webservices make up for PHP extensions? GD-library via webservices? Did some more research and at some point my head started spinning with acronyms and comparing concepts I knew not too much about at all. Then decided to think &#8220;What an interesting discussion&#8221; and have a cup of tea.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ren</title>
		<link>http://www.sitepoint.com/blogs/2006/09/05/php-extension-for-cairo-graphics-library/comment-page-1/#comment-53045</link>
		<dc:creator>Ren</dc:creator>
		<pubDate>Sat, 09 Sep 2006 10:55:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1704#comment-53045</guid>
		<description>I can&#039;t see that last sequence being more than a few cpu instructions. I&#039;d like to see some profiling data between the two, to see how much time it apparently takes over non-thread safe.

I&#039;d bet other design decisions have a far greater impact on raw speed than the running with thread safety.</description>
		<content:encoded><![CDATA[<p>I can&#8217;t see that last sequence being more than a few cpu instructions. I&#8217;d like to see some profiling data between the two, to see how much time it apparently takes over non-thread safe.</p>
<p>I&#8217;d bet other design decisions have a far greater impact on raw speed than the running with thread safety.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: HarryF</title>
		<link>http://www.sitepoint.com/blogs/2006/09/05/php-extension-for-cairo-graphics-library/comment-page-1/#comment-52832</link>
		<dc:creator>HarryF</dc:creator>
		<pubDate>Fri, 08 Sep 2006 21:28:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1704#comment-52832</guid>
		<description>&lt;blockquote&gt;
tried to find a list of thread-safe (or ZTS: &quot;Zend Thread Safe&quot;) extensions. Couldnâ€™t find anything,
&lt;/blockquote&gt;

Actually never seen anything like that either - I&#039;ve seen PCRE and GD mentioned before (somewhere - perhaps PHP internals list - can&#039;t remember) as being non-reentrant but perhaps I shouldn&#039;t believe everything I read online.

You got me wondering more though and perhaps &lt;a href=&quot;http://www.zend.com/lists/php-dev/200306/msg00812.html&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; highlights the problem with even compiling a list in the first place;

&lt;blockquote&gt;
&gt; Is there a short list of some common extensions that do work reliably
&gt; with Apache 2?  (eg MySQL, GD etc...)

Nope.  Make one.  It&#039;s not all that easy to create such a list.  Just take
a single library and go through it and tell me if it is threadsafe.  Can
you do that?  Do you know what to look for?  If it is threadsafe on one
platform, do you think it is threadsafe on another?  Does it depend on
which version of libc is on a platform?  Does it depend on how it was
compiled?
&lt;/blockquote&gt;

There&#039;s also &lt;a href=&quot;http://marc.theaimsgroup.com/?l=php-dev&amp;m=112492614422663&amp;w=2&quot; rel=&quot;nofollow&quot;&gt;this remark&lt;/a&gt;  (Andi Gutmans);

&lt;blockquote&gt;
You will most likely find that the &quot;faster&quot; Apache way with 
thread-safe PHP is slower than the slower Apache way with 
non-thread-safe PHP. And even FastCGI will be faster :)
&lt;/blockquote&gt;

That seems to tally with what Sara Golemon says &lt;a href=&quot;http://blog.libssh2.org/index.php?/archives/22-What-the-heck-is-TSRMLS_CC-anyway.html&quot; rel=&quot;nofollow&quot;&gt;What the heck is TSRMLS_CC anyway?&lt;/a&gt; (comments);

&lt;blockquote&gt;
&gt; Is the overhead of lookups in tsrm_ls significant,
&gt; when in ZTS &quot;mode&quot;? Put another way, why not have everything thread safe
&gt; and discourage the use of globals completely?
&gt;
At the CPU instruction level, it&#039;s the difference between:
Fetch a local value

and

Fetch a local value,
dereference it,
Fetch a local value,
Seek forward from that first dereference by that second local value,
Dereference that,
seek into that pointer by X bytes and dereference that value

Any guesses which is faster? Now multiply that difference by EVERY INSTANCE of xG() in the engine.
&lt;/blockquote&gt;

That leads to some depressing conclusions.</description>
		<content:encoded><![CDATA[<blockquote><p>
tried to find a list of thread-safe (or ZTS: &#8220;Zend Thread Safe&#8221;) extensions. Couldnâ€™t find anything,
</p></blockquote>
<p>Actually never seen anything like that either &#8211; I&#8217;ve seen PCRE and GD mentioned before (somewhere &#8211; perhaps PHP internals list &#8211; can&#8217;t remember) as being non-reentrant but perhaps I shouldn&#8217;t believe everything I read online.</p>
<p>You got me wondering more though and perhaps <a href="http://www.zend.com/lists/php-dev/200306/msg00812.html" rel="nofollow">this</a> highlights the problem with even compiling a list in the first place;</p>
<blockquote><p>
&gt; Is there a short list of some common extensions that do work reliably<br />
&gt; with Apache 2?  (eg MySQL, GD etc&#8230;)</p>
<p>Nope.  Make one.  It&#8217;s not all that easy to create such a list.  Just take<br />
a single library and go through it and tell me if it is threadsafe.  Can<br />
you do that?  Do you know what to look for?  If it is threadsafe on one<br />
platform, do you think it is threadsafe on another?  Does it depend on<br />
which version of libc is on a platform?  Does it depend on how it was<br />
compiled?
</p></blockquote>
<p>There&#8217;s also <a href="http://marc.theaimsgroup.com/?l=php-dev&amp;m=112492614422663&amp;w=2" rel="nofollow">this remark</a>  (Andi Gutmans);</p>
<blockquote><p>
You will most likely find that the &#8220;faster&#8221; Apache way with<br />
thread-safe PHP is slower than the slower Apache way with<br />
non-thread-safe PHP. And even FastCGI will be faster :)
</p></blockquote>
<p>That seems to tally with what Sara Golemon says <a href="http://blog.libssh2.org/index.php?/archives/22-What-the-heck-is-TSRMLS_CC-anyway.html" rel="nofollow">What the heck is TSRMLS_CC anyway?</a> (comments);</p>
<blockquote><p>
&gt; Is the overhead of lookups in tsrm_ls significant,<br />
&gt; when in ZTS &#8220;mode&#8221;? Put another way, why not have everything thread safe<br />
&gt; and discourage the use of globals completely?<br />
&gt;<br />
At the CPU instruction level, it&#8217;s the difference between:<br />
Fetch a local value</p>
<p>and</p>
<p>Fetch a local value,<br />
dereference it,<br />
Fetch a local value,<br />
Seek forward from that first dereference by that second local value,<br />
Dereference that,<br />
seek into that pointer by X bytes and dereference that value</p>
<p>Any guesses which is faster? Now multiply that difference by EVERY INSTANCE of xG() in the engine.
</p></blockquote>
<p>That leads to some depressing conclusions.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: streaky</title>
		<link>http://www.sitepoint.com/blogs/2006/09/05/php-extension-for-cairo-graphics-library/comment-page-1/#comment-52684</link>
		<dc:creator>streaky</dc:creator>
		<pubDate>Fri, 08 Sep 2006 08:51:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1704#comment-52684</guid>
		<description>&lt;blockquote&gt;one word

lighttpd&lt;/blockquote&gt;

one word: mod_rewrite ;)</description>
		<content:encoded><![CDATA[<blockquote><p>one word</p>
<p>lighttpd</p></blockquote>
<p>one word: mod_rewrite ;)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: patrikG</title>
		<link>http://www.sitepoint.com/blogs/2006/09/05/php-extension-for-cairo-graphics-library/comment-page-1/#comment-52417</link>
		<dc:creator>patrikG</dc:creator>
		<pubDate>Thu, 07 Sep 2006 06:26:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1704#comment-52417</guid>
		<description>Had a discussion with a colleague because of your blog (which is a good thing) and tried to find a list of thread-safe (or ZTS: &quot;Zend Thread Safe&quot;) extensions. Couldn&#039;t find anything, and thus not really establish whether pcre is thread-safe or not (apart from your comment  at http://programming.reddit.com/info/fhu0/comments).
Care to shed some light on it?</description>
		<content:encoded><![CDATA[<p>Had a discussion with a colleague because of your blog (which is a good thing) and tried to find a list of thread-safe (or ZTS: &#8220;Zend Thread Safe&#8221;) extensions. Couldn&#8217;t find anything, and thus not really establish whether pcre is thread-safe or not (apart from your comment  at <a href="http://programming.reddit.com/info/fhu0/comments)" rel="nofollow">http://programming.reddit.com/info/fhu0/comments)</a>.<br />
Care to shed some light on it?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Full(o)bloG &#187; Blog Archive &#187; Cairo per PHP</title>
		<link>http://www.sitepoint.com/blogs/2006/09/05/php-extension-for-cairo-graphics-library/comment-page-1/#comment-52162</link>
		<dc:creator>Full(o)bloG &#187; Blog Archive &#187; Cairo per PHP</dc:creator>
		<pubDate>Wed, 06 Sep 2006 07:41:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1704#comment-52162</guid>
		<description></description>
		<content:encoded><![CDATA[<p>[...] Gli amanti di Gnome conosceranno sicuramente Cairo, la libreria per la gestione/creazione di oggetti grafici vettoriali facente parte del progetto FreeDesktop. Oggi ho scoperto grazie a Harry Fuecks che è stato fatto un wrapper per la suddetta libreria per interfacciarsi con php. [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Script Artists &#124; Cairo PHP Wrapper</title>
		<link>http://www.sitepoint.com/blogs/2006/09/05/php-extension-for-cairo-graphics-library/comment-page-1/#comment-52152</link>
		<dc:creator>Script Artists &#124; Cairo PHP Wrapper</dc:creator>
		<pubDate>Wed, 06 Sep 2006 07:05:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1704#comment-52152</guid>
		<description>[...] Via Sitepoint        &#171; Noch mehr Cheat Sheets [...]</description>
		<content:encoded><![CDATA[<p>[...] Via Sitepoint        &laquo; Noch mehr Cheat Sheets [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: HarryF</title>
		<link>http://www.sitepoint.com/blogs/2006/09/05/php-extension-for-cairo-graphics-library/comment-page-1/#comment-52032</link>
		<dc:creator>HarryF</dc:creator>
		<pubDate>Tue, 05 Sep 2006 22:33:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1704#comment-52032</guid>
		<description>&lt;blockquote&gt;
The Worker MPM (which is what you meant, of course) is thread-based, and improves performance for most applications.
&lt;/blockquote&gt;

Thanks for picked nit ;) That&#039;s what I meant.

&lt;blockquote&gt;
lighttpd
&lt;/blockquote&gt;

But that&#039;s FastCGI</description>
		<content:encoded><![CDATA[<blockquote><p>
The Worker MPM (which is what you meant, of course) is thread-based, and improves performance for most applications.
</p></blockquote>
<p>Thanks for picked nit ;) That&#8217;s what I meant.</p>
<blockquote><p>
lighttpd
</p></blockquote>
<p>But that&#8217;s FastCGI</p>]]></content:encoded>
	</item>
</channel>
</rss>
