<?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 for Eric Butler's Weblog</title>
	<atom:link href="http://www.ericbutler.net/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ericbutler.net/blog</link>
	<description>Game Development and Programming</description>
	<pubDate>Thu, 20 Nov 2008 08:08:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>Comment on Adventures in X Programming by Bookmarks about Programming</title>
		<link>http://www.ericbutler.net/blog/2008/07/adventures-in-x-programming/#comment-192</link>
		<dc:creator>Bookmarks about Programming</dc:creator>
		<pubDate>Thu, 25 Sep 2008 19:30:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=8#comment-192</guid>
		<description>[...] - bookmarked by 4 members originally found by shortkat1 on 2008-09-08  Adventures in X Programming  http://www.ericbutler.net/blog/2008/07/adventures-in-x-programming/ - bookmarked by 5 members [...]</description>
		<content:encoded><![CDATA[<p>[...] - bookmarked by 4 members originally found by shortkat1 on 2008-09-08  Adventures in X Programming  <a href="http://www.ericbutler.net/blog/2008/07/adventures-in-x-programming/"  rel="nofollow">http://www.ericbutler.net/blog/2008/07/adventures-in-x-programming/</a> - bookmarked by 5 members [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Canvas Text Goes ‮‮ Bidirectional by Blair McBride</title>
		<link>http://www.ericbutler.net/blog/2008/07/canvas-text-goes-bidirectional/#comment-29</link>
		<dc:creator>Blair McBride</dc:creator>
		<pubDate>Thu, 24 Jul 2008 03:41:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=11#comment-29</guid>
		<description>Great news - getting closer to the spec.

Pity the spec is lacking some things, compared to the Moz implementation. Specifically, drawing text along paths, and creating a path from text. The former of which can be *very* useful.</description>
		<content:encoded><![CDATA[<p>Great news - getting closer to the spec.</p>
<p>Pity the spec is lacking some things, compared to the Moz implementation. Specifically, drawing text along paths, and creating a path from text. The former of which can be *very* useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Adventures in X Programming by Anant</title>
		<link>http://www.ericbutler.net/blog/2008/07/adventures-in-x-programming/#comment-24</link>
		<dc:creator>Anant</dc:creator>
		<pubDate>Sun, 06 Jul 2008 15:23:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=8#comment-24</guid>
		<description>I think it would be good to have this integrated into Cairo, and let the application decide whether they want to use shm or not. Depending on what the application is, this may or may not be useful, but you should leave the option open to cases where it does make a significant difference.</description>
		<content:encoded><![CDATA[<p>I think it would be good to have this integrated into Cairo, and let the application decide whether they want to use shm or not. Depending on what the application is, this may or may not be useful, but you should leave the option open to cases where it does make a significant difference.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Adventures in X Programming by Boris</title>
		<link>http://www.ericbutler.net/blog/2008/07/adventures-in-x-programming/#comment-23</link>
		<dc:creator>Boris</dc:creator>
		<pubDate>Sun, 06 Jul 2008 05:54:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericbutler.net/blog/?p=8#comment-23</guid>
		<description>Eric, my X fu is weak, so bear with me for a bit here.  Is it possible to keep doing what we do now (the XPutImage) until we get the callback from X (or whatever method it uses to communicate this information) indicating that the XShm call succeeded, then switch to the shm thing.  This means more memory usage between the Shm call and us knowing that it succeeded than we use now, but that might be ok...

In other words, we'd have three stages in the life of an image:

1)  Image is not all decoded, needs to be drawn, not in shared memory, use XPutImage.
2)  Image is not all decoded, in shared memory, use XShm
3)  Image decoded, optimize.

Or would we never hit stage 2 in practice?

Another interesting question here is how often we in fact end up having to draw an image that is only partially decoded and whether we can reasonably reduce the number of times this happens (in other words, try hard to only draw images that have been optimized to pixmaps).  Would that have similar performance benefits without the obvious pain of the XSync hit?

I should also note that the XSync hit will always be worse (a LOT worse) on a non-local X, so it's something we should, imo, either avoid or make optional (e.g. disable the Shm thing based on a pref) if possible.</description>
		<content:encoded><![CDATA[<p>Eric, my X fu is weak, so bear with me for a bit here.  Is it possible to keep doing what we do now (the XPutImage) until we get the callback from X (or whatever method it uses to communicate this information) indicating that the XShm call succeeded, then switch to the shm thing.  This means more memory usage between the Shm call and us knowing that it succeeded than we use now, but that might be ok&#8230;</p>
<p>In other words, we&#8217;d have three stages in the life of an image:</p>
<p>1)  Image is not all decoded, needs to be drawn, not in shared memory, use XPutImage.<br />
2)  Image is not all decoded, in shared memory, use XShm<br />
3)  Image decoded, optimize.</p>
<p>Or would we never hit stage 2 in practice?</p>
<p>Another interesting question here is how often we in fact end up having to draw an image that is only partially decoded and whether we can reasonably reduce the number of times this happens (in other words, try hard to only draw images that have been optimized to pixmaps).  Would that have similar performance benefits without the obvious pain of the XSync hit?</p>
<p>I should also note that the XSync hit will always be worse (a LOT worse) on a non-local X, so it&#8217;s something we should, imo, either avoid or make optional (e.g. disable the Shm thing based on a pref) if possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Cairo, Xlib, and the Shared Memory Extension 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>Comment on Cairo, Xlib, and the Shared Memory Extension 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>Comment on Cairo, Xlib, and the Shared Memory Extension 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>Comment on Cairo, Xlib, and the Shared Memory Extension 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>Comment on Cairo, Xlib, and the Shared Memory Extension 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>Comment on Cairo, Xlib, and the Shared Memory Extension 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>
</channel>
</rss>
