<?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"
	>
<channel>
	<title>Comments on: Cairo, Xlib, and the Shared Memory Extension</title>
	<atom:link href="http://www.ericbutler.net/blog/2008/06/cairo-xlib-and-the-shared-memory-extension/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ericbutler.net/blog/2008/06/cairo-xlib-and-the-shared-memory-extension/</link>
	<description>Game Development and Programming</description>
	<pubDate>Tue, 06 Jan 2009 02:56:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Eric Butler&#8217;s Weblog &#187; Blog Archive &#187; Adventures in X Programming</title>
		<link>http://www.ericbutler.net/blog/2008/06/cairo-xlib-and-the-shared-memory-extension/#comment-22</link>
		<dc:creator>Eric Butler&#8217;s Weblog &#187; Blog Archive &#187; Adventures in X Programming</dc:creator>
		<pubDate>Sat, 05 Jul 2008 21:33:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=6#comment-22</guid>
		<description>[...] Eric Butler&#8217;s Weblog something about programming and game making and stuff like that      &#171; Cairo, Xlib, and the Shared Memory Extension [...]</description>
		<content:encoded><![CDATA[<p>[...] Eric Butler&#8217;s Weblog something about programming and game making and stuff like that      &laquo; Cairo, Xlib, and the Shared Memory Extension [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dustin</title>
		<link>http://www.ericbutler.net/blog/2008/06/cairo-xlib-and-the-shared-memory-extension/#comment-20</link>
		<dc:creator>Dustin</dc:creator>
		<pubDate>Thu, 03 Jul 2008 07:28:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=6#comment-20</guid>
		<description>vsync: X will grow to INSANE memory usage if you have pixman 0.11.4, because it doesn't free redrawn regions or something to that effect. Upgrade pixman and everything may be fine.</description>
		<content:encoded><![CDATA[<p>vsync: X will grow to INSANE memory usage if you have pixman 0.11.4, because it doesn&#8217;t free redrawn regions or something to that effect. Upgrade pixman and everything may be fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Lahti</title>
		<link>http://www.ericbutler.net/blog/2008/06/cairo-xlib-and-the-shared-memory-extension/#comment-19</link>
		<dc:creator>William Lahti</dc:creator>
		<pubDate>Tue, 01 Jul 2008 19:34:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=6#comment-19</guid>
		<description>Ahh I see you've already replied to that point. Well, sending the data one time is a HUGE difference from transferring per each change or even per each frame. In fact, XSHM looks extremely effective compared against images but how about you post a few benchmarks comparing xlib+xrender vs xshm and THEN we will see how impressive it is!</description>
		<content:encoded><![CDATA[<p>Ahh I see you&#8217;ve already replied to that point. Well, sending the data one time is a HUGE difference from transferring per each change or even per each frame. In fact, XSHM looks extremely effective compared against images but how about you post a few benchmarks comparing xlib+xrender vs xshm and THEN we will see how impressive it is!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Lahti</title>
		<link>http://www.ericbutler.net/blog/2008/06/cairo-xlib-and-the-shared-memory-extension/#comment-18</link>
		<dc:creator>William Lahti</dc:creator>
		<pubDate>Tue, 01 Jul 2008 19:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=6#comment-18</guid>
		<description>Why do you not mention XRender... just using normal xlib pixmap surfaces to do this!? I mean, certainly XSHM surfaces would be very useful where you really must keep a few image surfaces around, but in most cases (especially for static graphics files) you can blit them from the image surface into your xlib pixmap and then destroy the original image surface. I have NO CLUE why exactly firefox isn't using such a method--- perhaps they need a cairo coach :-) ?</description>
		<content:encoded><![CDATA[<p>Why do you not mention XRender&#8230; just using normal xlib pixmap surfaces to do this!? I mean, certainly XSHM surfaces would be very useful where you really must keep a few image surfaces around, but in most cases (especially for static graphics files) you can blit them from the image surface into your xlib pixmap and then destroy the original image surface. I have NO CLUE why exactly firefox isn&#8217;t using such a method&#8212; perhaps they need a cairo coach <img src='http://www.ericbutler.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://www.ericbutler.net/blog/2008/06/cairo-xlib-and-the-shared-memory-extension/#comment-16</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Sun, 29 Jun 2008 16:44:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=6#comment-16</guid>
		<description>Z_God: try changing your theme.  GTK+ doesn't do anything particularly bad for remote connections (neither does it do things particularly well, either), but a bad theme can easily slaughter your performance, as it might cause an unnecessary number of image draws and other operations to be performed.

markus: given that the Xorg guys wrote the Xshm extension for this very reason, I doubt they will hate it.  They're not as stupid as this assholish blog post makes them out to be.  The author might try to remember that X was originally designed in a day and age when image data was not anywhere close to the size it is today, and that without that network-centric design we wouldn't have the power and flexibility of networked X that we have and use today.  It isn't "idiocy" to design X the way it is -- it is at worst an oversight of the application and toolkit authors who ignore the Xshm extension.

vsync: try xrestop, which exists for that very purpose.  keep in mind that Linux is going to report a lot of memory usage for X11 that has nothing to do with your actual usage of RAM, such as video memory usage.  Also keep in mind how memory allocation works, and that a large variety of memory allocations will never be released to the OS until the application ends. malloc() grows the heap for smaller block requests, and unless _all_ blocks in the end of the heap are freed, the application cannot shrink the heap.  Larger allocations (like some -- but not all -- image data) are often allocated using a different technique that makes it possible to immediately free the memory back to the OS when the application is done with the block.</description>
		<content:encoded><![CDATA[<p>Z_God: try changing your theme.  GTK+ doesn&#8217;t do anything particularly bad for remote connections (neither does it do things particularly well, either), but a bad theme can easily slaughter your performance, as it might cause an unnecessary number of image draws and other operations to be performed.</p>
<p>markus: given that the Xorg guys wrote the Xshm extension for this very reason, I doubt they will hate it.  They&#8217;re not as stupid as this assholish blog post makes them out to be.  The author might try to remember that X was originally designed in a day and age when image data was not anywhere close to the size it is today, and that without that network-centric design we wouldn&#8217;t have the power and flexibility of networked X that we have and use today.  It isn&#8217;t &#8220;idiocy&#8221; to design X the way it is &#8212; it is at worst an oversight of the application and toolkit authors who ignore the Xshm extension.</p>
<p>vsync: try xrestop, which exists for that very purpose.  keep in mind that Linux is going to report a lot of memory usage for X11 that has nothing to do with your actual usage of RAM, such as video memory usage.  Also keep in mind how memory allocation works, and that a large variety of memory allocations will never be released to the OS until the application ends. malloc() grows the heap for smaller block requests, and unless _all_ blocks in the end of the heap are freed, the application cannot shrink the heap.  Larger allocations (like some &#8212; but not all &#8212; image data) are often allocated using a different technique that makes it possible to immediately free the memory back to the OS when the application is done with the block.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bodo Linux grafični programi postali hitrejši? &#171; lukov blog</title>
		<link>http://www.ericbutler.net/blog/2008/06/cairo-xlib-and-the-shared-memory-extension/#comment-15</link>
		<dc:creator>Bodo Linux grafični programi postali hitrejši? &#171; lukov blog</dc:creator>
		<pubDate>Sun, 29 Jun 2008 15:09:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=6#comment-15</guid>
		<description>[...] popravek za knjižnico cairo, ki skrbi za vektorski izris grafike za Gtk+ programe kot za Firefox. Raziskava, ki jo je opravil in njeni rezultati pa so osupljivi, saj so s popravljeno cairo knjižnico, ki [...]</description>
		<content:encoded><![CDATA[<p>[...] popravek za knjižnico cairo, ki skrbi za vektorski izris grafike za Gtk+ programe kot za Firefox. Raziskava, ki jo je opravil in njeni rezultati pa so osupljivi, saj so s popravljeno cairo knjižnico, ki [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bastiaan</title>
		<link>http://www.ericbutler.net/blog/2008/06/cairo-xlib-and-the-shared-memory-extension/#comment-14</link>
		<dc:creator>Bastiaan</dc:creator>
		<pubDate>Sun, 29 Jun 2008 08:45:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=6#comment-14</guid>
		<description>Did you ever talk to any of the Cairo people about this?

If you had, you might have noticed that they have an experimental branch with XShm support. However, the verdict is still out whether or not this actually benefits performance in the long run /for internal usage in Cairo/. 

They have done a lot of benchmarking. You might wish to simply continue that if you wish to work on this.</description>
		<content:encoded><![CDATA[<p>Did you ever talk to any of the Cairo people about this?</p>
<p>If you had, you might have noticed that they have an experimental branch with XShm support. However, the verdict is still out whether or not this actually benefits performance in the long run /for internal usage in Cairo/. </p>
<p>They have done a lot of benchmarking. You might wish to simply continue that if you wish to work on this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vsync</title>
		<link>http://www.ericbutler.net/blog/2008/06/cairo-xlib-and-the-shared-memory-extension/#comment-13</link>
		<dc:creator>vsync</dc:creator>
		<pubDate>Sun, 29 Jun 2008 01:01:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=6#comment-13</guid>
		<description>Neat stuff.  Good work, look forward to even faster Firefox and the like!

Unrelated question, but you might be a good person to ask.  I notice on my machine here that after some days of X11 usage including heavy Firefox browsing etc, my Xorg process crawls up to 900MB or so memory usage.  Could this be from pixmap caching?  Is there any way to tell what's using the memory and purge it?

It persists even after I close all apps, until I restart the X server itself.</description>
		<content:encoded><![CDATA[<p>Neat stuff.  Good work, look forward to even faster Firefox and the like!</p>
<p>Unrelated question, but you might be a good person to ask.  I notice on my machine here that after some days of X11 usage including heavy Firefox browsing etc, my Xorg process crawls up to 900MB or so memory usage.  Could this be from pixmap caching?  Is there any way to tell what&#8217;s using the memory and purge it?</p>
<p>It persists even after I close all apps, until I restart the X server itself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: markus</title>
		<link>http://www.ericbutler.net/blog/2008/06/cairo-xlib-and-the-shared-memory-extension/#comment-12</link>
		<dc:creator>markus</dc:creator>
		<pubDate>Sat, 28 Jun 2008 23:47:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=6#comment-12</guid>
		<description>This sounds like a great news but I am sure some Xorg guys will hate it ... :)</description>
		<content:encoded><![CDATA[<p>This sounds like a great news but I am sure some Xorg guys will hate it &#8230; <img src='http://www.ericbutler.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.ericbutler.net/blog/2008/06/cairo-xlib-and-the-shared-memory-extension/#comment-11</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Sat, 28 Jun 2008 23:29:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=6#comment-11</guid>
		<description>Web pages often involve many small images, so I am wondering if there will be a big improvement in general? It seems you could greatly improve the performance if you did not have to setup and tear down the shared memory segment each time. Could you use a custom pool allocator that reused the same shared mem ptr?</description>
		<content:encoded><![CDATA[<p>Web pages often involve many small images, so I am wondering if there will be a big improvement in general? It seems you could greatly improve the performance if you did not have to setup and tear down the shared memory segment each time. Could you use a custom pool allocator that reused the same shared mem ptr?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
