<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Vladimir Vukićević</title>
	<atom:link href="http://blog.vlad1.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.vlad1.com</link>
	<description>Look, it's a tagline!</description>
	<pubDate>Tue, 06 May 2008 19:57:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Well Isn&#8217;t That Qt</title>
		<link>http://blog.vlad1.com/2008/05/06/well-isnt-that-qt/</link>
		<comments>http://blog.vlad1.com/2008/05/06/well-isnt-that-qt/#comments</comments>
		<pubDate>Tue, 06 May 2008 19:53:12 +0000</pubDate>
		<dc:creator>vladimir</dc:creator>
		
		<category><![CDATA[Mozilla]]></category>

		<category><![CDATA[gecko]]></category>

		<category><![CDATA[gfx]]></category>

		<category><![CDATA[qt]]></category>

		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://blog.vlad1.com/?p=55</guid>
		<description><![CDATA[I and a few others have been poking at our widget layer for the past few weeks, looking at adding Qt support.  There was an earlier attempt at a Qt backend, but it never really got maintained, and there wasn't much interest in it back then.  Recently, though, Qt has made great strides on embedded [...]]]></description>
			<content:encoded><![CDATA[<p>I and a few others have been poking at our widget layer for the past few weeks, looking at adding Qt support.  There was an earlier attempt at a Qt backend, but it never really got maintained, and there wasn't much interest in it back then.  Recently, though, Qt has made great strides on embedded devices and with support for advanced graphics architectures (such as support for OpenGL and DirectX rendering), and might be a great way for us to get a feel for some of the problems we'll face in the future when we try to integrate 3D-accelerated rendering into Gecko.  Folks at Nokia have contributed much of this code, since they're interested in experimenting with Qt as well.  We've got the <a href="http://hg.mozilla.org/users/vladimir_mozilla.com/mozilla-qt" onclick="javascript:pageTracker._trackPageview('/outbound/article/hg.mozilla.org');">initial work available on a hg branch</a> (off mozilla-central; our first experiment on big-project branches in the future hg world).</p>
<p>I've had a great time working with Qt so far; it seems like a well-designed modern toolkit.  There are a few quirks; most notably, the pieces that Gecko/Cairo needs to render text aren't really there, but on the whole the integration is pretty good.  The big text piece that's missing is a drawGlyphs method on QPainter — something that would take a QFont and an array of glyphs and positions.  Additionally, methods to go from a string to an array of glyph indices/positions for a given QFont would also be helpful (though most of our font backend here is using FreeType directly, so we can obtain glyph indices directly).  In the QPainter Cairo backend that I wrote, I kind of cheat on this issue under X11 — I grab the X Drawable and pass on the show_glyphs work down to a wrapper xlib surface... but that doesn't work for Qt Embedded.  Anyone out there who knows Qt innards well want to implement this?</p>
<p>There are a few other minor annoyances with QPainter; Cairo's rendering code does a pretty good job of letting operations be specified in a general way (e.g. everything with paths), and it does whatever optimizations are possible internally (e.g. converting a rectangular path to a rectangle for clipping/painting purposes).  QPainter doesn't seem to have these optimizations for the general path methods, so the QPainter backend has to do a bunch of extra work to detect this case to call the faster filling functions.  Similar optimizations are missed for brushes — filling with a tiled pixmap QBrush is slower than calling drawTiledPixamp, even without transforms.  The Cairo backend tries to handle these cases, but there's more that needs to be done.</p>
<p>Overall, though, what's on the Qt branch now works pretty well under X11; under Qt Embedded, there are some problems with text rendering mentioned above, but things are in good shape otherwise.  I hope that in the future that the Qt port will be a toplevel supported Gecko port, alongside gtk2, Win32, and OSX, but there's still a bunch of work needed to make that happen.  If anyone's interested in helping out, drop in to #gfx on mozilla irc!</p>
<p>(Note that there aren't any plans on switching away from gtk2 for our official Linux/X11 builds; gtk2 will remain the default supported toolkit there.)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vlad1.com/2008/05/06/well-isnt-that-qt/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Canvas 3D Extension Update</title>
		<link>http://blog.vlad1.com/2008/05/01/canvas-3d-extension-update/</link>
		<comments>http://blog.vlad1.com/2008/05/01/canvas-3d-extension-update/#comments</comments>
		<pubDate>Thu, 01 May 2008 17:55:11 +0000</pubDate>
		<dc:creator>vladimir</dc:creator>
		
		<category><![CDATA[Mozilla]]></category>

		<category><![CDATA[canvas]]></category>

		<category><![CDATA[gfx]]></category>

		<category><![CDATA[opengl]]></category>

		<guid isPermaLink="false">http://blog.vlad1.com/?p=54</guid>
		<description><![CDATA[More to come on Canvas 3D in a bit, but I wanted to post that I've (finally!) updated the Canvas 3D extension to work with the latest Firefox 3 betas — will work with the latest nightlies, and should work with 3.0b5 as well.  You can grab it from its new home at addons.mozilla.org, which [...]]]></description>
			<content:encoded><![CDATA[<p>More to come on Canvas 3D in a bit, but I wanted to post that I've (finally!) updated the Canvas 3D extension to work with the latest Firefox 3 betas — will work with the latest nightlies, and <em>should</em> work with 3.0b5 as well.  You can grab it from its <a href="https://addons.mozilla.org/en-US/firefox/addon/7171" onclick="javascript:pageTracker._trackPageview('/outbound/article/addons.mozilla.org');">new home at addons.mozilla.org</a>, which will give me the ability to push updates in the usual addon update fashion.  In the next week I'm going to try to provide builds that can use pure software rendering through <a href="http://mesa3d.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/mesa3d.org');">Mesa 3D</a>, for those without working GL support.  (The <a href="http://blog.vlad1.com/2007/11/26/canvas-3d-gl-power-web-style/" >previous post on Canvas3D</a> has some more information and a few test examples.)</p>
<p>I've tested this build on OS X and Windows; I was unable to test in Linux under VMware — Firefox crashed with a GLXUnsupportedPrivateRequest X error.  (If anyone wants to check this under Linux with a real OpenGL driver, let me know how it goes.)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vlad1.com/2008/05/01/canvas-3d-extension-update/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Scary Disk Munging: Success!</title>
		<link>http://blog.vlad1.com/2008/04/07/scary-disk-munging-success/</link>
		<comments>http://blog.vlad1.com/2008/04/07/scary-disk-munging-success/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 18:27:58 +0000</pubDate>
		<dc:creator>vladimir</dc:creator>
		
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.vlad1.com/?p=51</guid>
		<description><![CDATA[As a former Windows user on my MBP, I had half of my 160gb disk allocated to Windows and the other half to MacOS X.  This worked fine for quite a while, but now that I have a 30GB Linux VM on my Mac partition, things started getting tight very quickly.  I was terrified: I [...]]]></description>
			<content:encoded><![CDATA[<p>As a former Windows user on my MBP, I had half of my 160gb disk allocated to Windows and the other half to MacOS X.  This worked fine for quite a while, but now that I have a 30GB Linux VM on my Mac partition, things started getting tight very quickly.  I was terrified: I had to shrink my NTFS Boot Camp partition, then move it, and then expand my MacOS HFS+ partition.  In the past, this type of thing almost always resulted in recovering from backups.</p>
<p>Looking around, though, I found <a href="http://www.coriolis-systems.com/iPartition.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.coriolis-systems.com');">iPartition</a>, which claimed it could do exactly what I wanted.  So, I bought it, burned the CD.. went through the cute UI (grabbing a little circular slider and adjusting partition sizes while large numeric readouts adjust in real time), gulped, and hit Go.</p>
<p>An hour or two later, everything was resized, moved, and back in action.  I'm impressed (which is why I'm posting... usually these stories don't have happy endings).  The software's a bit pricy for something that you won't use all that often (I wish they'd included a full version of iDefrag along with it), but that's probably exactly why it's pricy -- when you need it, it does exactly what you want.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vlad1.com/2008/04/07/scary-disk-munging-success/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Little More Cairo, Just For You</title>
		<link>http://blog.vlad1.com/2008/03/18/a-little-more-cairo-just-for-you/</link>
		<comments>http://blog.vlad1.com/2008/03/18/a-little-more-cairo-just-for-you/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 00:04:10 +0000</pubDate>
		<dc:creator>vladimir</dc:creator>
		
		<category><![CDATA[Mozilla]]></category>

		<category><![CDATA[cairo]]></category>

		<category><![CDATA[gfx]]></category>

		<category><![CDATA[pixman]]></category>

		<category><![CDATA[rendering]]></category>

		<guid isPermaLink="false">http://blog.vlad1.com/2008/03/18/a-little-more-cairo-just-for-you/</guid>
		<description><![CDATA[There were a few things that I left out of my previous post about Cairo status (as a few people pointed out), and I wanted to highlight them here.
For the past two months, Antoine Azar and Frédéric Plourde have been working for Mozilla, cranking away at both Cairo and pixman.  They started out with a [...]]]></description>
			<content:encoded><![CDATA[<p>There were a few things that I left out of <a href="http://blog.vlad1.com/2008/03/16/cairo-16-quartz-and-gecko/" >my previous post about Cairo status</a> (as a few people pointed out), and I wanted to highlight them here.</p>
<p>For the past two months, Antoine Azar and Frédéric Plourde have been working for Mozilla, cranking away at both Cairo and pixman.  They started out with a completely unfamiliar codebase and quickly producing useful enhancements.  Antoine was able to implement some missing support in pixman, allowing us to implement smooth scaling of images.  This was the final missing piece that makes Firefox 3's full-page zoom feature able to display a high quality version of the unscaled page.</p>
<p>Johnathan sent me some screenshots from Vista, comparing the rendering of a recent Firefox 3 beta to IE 8's beta.  He's running in Vista's high-DPI mode, so all the scaling was applied by default.  Firefox is on the left, IE's on the right... the difference is pretty striking (click for the full image, make sure you view it unscaled for all the gory details):</p>
<p align="center"> <a href="http://people.mozilla.org/~johnath/image-scaling/image-scaling-ff3.png" title="Image Scaling - Firefox 3" onclick="javascript:pageTracker._trackPageview('/outbound/article/people.mozilla.org');"><img src="http://blog.vlad1.com/wp-content/uploads/2008/03/scaling-fx31.png" alt="Image Scaling - Firefox 3" /></a>    <a href="http://people.mozilla.org/~johnath/image-scaling/image-scaling-ie8.png" title="Image Scaling - IE 8" onclick="javascript:pageTracker._trackPageview('/outbound/article/people.mozilla.org');"><img src="http://blog.vlad1.com/wp-content/uploads/2008/03/scaling-ie8.png" alt="Image Scaling - IE 8" /></a></p>
<p>Linux users will have to wait a little longer to get higher quality image scaling; as we now rely on the X server to do image compositing through the Render extension, we'll have to wait until the pixman patches are integrated into the X server.  I'm hoping that will happen in time for the next X.org release.</p>
<p>Frédéric has also been working with pixman, specifically low-level optimization of the compositing routines (pixman is used on Windows for all non-trivial rendering, and used indirectly on Linux through the X server).  He cleaned up the existing MMX code so that it could build with Visual C++, and is now working on further optimization and extending the existing fast paths.  In Mozilla, we've enabled the MMX code everywhere.</p>
<p>At around the same time,  a rapidly-progressing effort to add SSE2-optimized paths to pixman began on the Cairo mailing list, and Frederic will be joining those guys shortly.  Given that most x86 computers in the past few years have full SSE2 support, it makes sense to focus work there. Early results are showing significant peformance gains, which should be a huge boon for authors taking advantage of SVG and Canvas features.  Much of this additional work will not ship with Firefox 3 at release time, but it may come shortly after in a minor release.  I'm pretty excited to have additional improvements already waiting in the wings... I think you'll see Gecko continuing the past few months' trend of rapid development even after Firefox 3's release.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vlad1.com/2008/03/18/a-little-more-cairo-just-for-you/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cairo 1.6, Quartz, and Gecko</title>
		<link>http://blog.vlad1.com/2008/03/16/cairo-16-quartz-and-gecko/</link>
		<comments>http://blog.vlad1.com/2008/03/16/cairo-16-quartz-and-gecko/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 06:20:59 +0000</pubDate>
		<dc:creator>vladimir</dc:creator>
		
		<category><![CDATA[Mozilla]]></category>

		<category><![CDATA[apple]]></category>

		<category><![CDATA[cairo]]></category>

		<category><![CDATA[quartz]]></category>

		<guid isPermaLink="false">http://blog.vlad1.com/2008/03/16/cairo-16-quartz-and-gecko/</guid>
		<description><![CDATA[One of the things that I've worked on for the past while is a Quartz backend for Cairo -- mainly for Mozilla, but also to show that Cairo has a great API that maps well to existing 2D APIs.  Cairo is a great 2D portability layer, ensuring that rich 2D graphics can be portable.  I'm [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things that I've worked on for the past while is a Quartz backend for <a href="http://cairographics.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/cairographics.org');">Cairo</a> -- mainly for Mozilla, but also to show that Cairo has a great API that maps well to existing 2D APIs.  Cairo is a great 2D portability layer, ensuring that rich 2D graphics can be portable.  I'm excited about the upcoming Cairo 1.6 in particular, because the Quartz backend will be marked as stable and supported.  This will mean that Cairo is usable and supported on the three main platforms in use today -- Windows, Linux, and MacOS X.  I've filed a bug with Apple (bug #5802204) about making public the APIs that I've had to use to implement the full suite of Cairo capabilities using Quartz.  (For anyone interested, the cairo-quartz implementation file has a handful of quite useful methods.)</p>
<p><img src="http://people.mozilla.com/~vladimir/misc/aspen-cairo.png" align="left" width="110" />One interesting bit of fallout from this is that Quartz/CoreGraphics also happens to be the native graphics layer for the iPhone: so, Cairo is trivially portable to the iPhone.  The major issue is that Cairo currently uses ATSUI for font access, whereas it needs to be using CGFont -- which is the native font API suppored under MacOS X 10.5 and the iPhone.  (However, the CGFont API is missing many public methods to make it entirely general, but I hope that will be remedied in time.)  I've made some last-minute changes to Cairo to allow us to switch to a CGFont-based text backend with no change to Cairo-using apps, and I have such a backend in progress for landing shortly after Cairo 1.6 is released.</p>
<p>There is also some exciting work going on with improving the pixman library that cairo uses for its software-only rendering -- I've often maligned it for being slow and hard to work with, but the newer cleaned-up version is much easier to deal with, and Soeren has great plans for its future.  A number of people are working on adding highly optimized MMX and SSE2 compositing routines to augment the little bit of MMX code that's present currently.  Initial benchmarks are pretty encouraging, and I'm hoping that we can do some optimization work targetted at ARM as well.  There is also some work in progress to implement accelerated backends using OpenGL (and ultimately Direct3D).</p>
<p>Gecko 1.9 (and thus Firefox 3) will be shipping with Cairo 1.6 (or, as close as possible, if the schedules don't quite line up): everything that Firefox 3 renders on the screen is going through Cairo, and is ultimately translated by Cairo into the native platform API.  Future work to expand Gecko's graphical capabilities will intimately involve Cairo.  It's safe to say that Cairo is ready for prime time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vlad1.com/2008/03/16/cairo-16-quartz-and-gecko/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Silverwhat?</title>
		<link>http://blog.vlad1.com/2008/03/10/silverwhat/</link>
		<comments>http://blog.vlad1.com/2008/03/10/silverwhat/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 21:38:32 +0000</pubDate>
		<dc:creator>vladimir</dc:creator>
		
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.vlad1.com/2008/03/10/silverwhat/</guid>
		<description><![CDATA[From a transcript of the SXSW browser panel:
Chris [Wilson]: The thing that I'm really passionate about is web standards. Silverlight is a part of the web just like PDF and plaintext are part of the web.
Uh, it's what now?  (Read the rest of the panel transcript, it's pretty good.)
]]></description>
			<content:encoded><![CDATA[<p>From a <a href="http://www.appscout.com/2008/03/sxsw_browser_wars_become_brows.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.appscout.com');">transcript of the SXSW browser panel</a>:</p>
<blockquote><p>Chris [Wilson]: <em>The thing that I'm really passionate about is web standards. Silverlight is a part of the web just like PDF and plaintext are part of the web.</em></p></blockquote>
<p align="left">Uh, it's what now?  (Read the rest of the panel transcript, it's pretty good.)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vlad1.com/2008/03/10/silverwhat/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Finding the OS X Turbo Button</title>
		<link>http://blog.vlad1.com/2008/02/28/finding-the-os-x-turbo-button/</link>
		<comments>http://blog.vlad1.com/2008/02/28/finding-the-os-x-turbo-button/#comments</comments>
		<pubDate>Thu, 28 Feb 2008 15:50:55 +0000</pubDate>
		<dc:creator>vladimir</dc:creator>
		
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.vlad1.com/2008/02/28/finding-the-os-x-turbo-button/</guid>
		<description><![CDATA[Some of you may have noticed that the Firefox 3 nightly builds have felt a lot snappier since a few weeks ago.  There's an interesting story in that, one that I finally have time to write up.  We've had a number of bugs on the Mac where people were complaining of bad performance compared to [...]]]></description>
			<content:encoded><![CDATA[<p>Some of you may have noticed that the Firefox 3 nightly builds have felt a lot snappier since a few weeks ago.  There's an interesting story in that, one that I finally have time to write up.  We've had a number of bugs on the Mac where people were complaining of bad performance compared to Firefox 2, usually involving a test where a page was scrolled by a small step 100 or so times, and the time from start to finish was recorded.  In many of these tests, Fx3 was coming in at 50% to 500%+ slower.  This was odd, because in theory the graphics layer (which is what scrolling is mostly exercising) in Firefox 3 should be faster, given that it's talking almost directly to Quartz.</p>
<p>I noticed a few odd things -- if I disabled drawing of the native theme (used for the scrollbar), and if I tested just a tall page with a solid colored background and a scrollbar, I saw the same performance issues.  There's a problem here, one that I initially <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=417612" onclick="javascript:pageTracker._trackPageview('/outbound/article/bugzilla.mozilla.org');">blamed on the native theme drawing</a>, because if I disabled native theme rendering, benchmark performance shot up, but there were still some inconsistencies.  I collected some numbers: for a given test, the minimum time that it can report is the number of iterations multiplied by the setTimeout delay used.  For example, with 200 iterations and a 50ms setTimeout, there's no way that test can finish faster than 10,000ms.  The difference between that time and the time the test actually reports is the time spent doing interesting things.  By running my test for different timing values, I ended up with this graph:</p>
<p align="center"><a href="http://blog.vlad1.com/wp-content/uploads/2008/02/20080228-timing.png" title="20080228-timing.png" ><img src="http://blog.vlad1.com/wp-content/uploads/2008/02/20080228-timing.png" alt="20080228-timing.png" /></a></p>
<p align="left">The horizontal axis is the setTimeout value, and the vertical axis is in milliseconds.  That plateau there?  That's not supposed to be there.  Looking more closely at that number, it's roughly 6500ms.  With 200 iterations, that's 6500/200 = ~32.5ms per iteration.  So, per second, that gives us 1000/32.5 ~= 30.77.  We're capping at 30.77 frames per second here.   That's way too round of a number.  Even more suspicious, if I disabled native theme rendering, the test hit a plateau at around 3300ms, which ends up being 60fps.</p>
<p align="left">It's at this point that I start to get an idea of what's going on.  I was aware of Beam Sync on OSX, but assumed that each app had to opt-in to it, given that it didn't seem to affect Firefox 2.  Quartz Debug lets you disable Beam Sync on a global basis; I did that, and the benchmark numbers dropped -- the line above kept nicely following the blue line down, and I was able to peg the fps needle in Quartz Debug over to the right.  So, we're being throttled by the OS which is forcing us to wait for the next frame interval before allowing us to draw again.  This is a pretty serious problem, because at this point I thought that the only way to disable this was on a system-wide basis, which wouldn't be acceptable.  Firefox 2 didn't suffer from this, though, so I did some more digging.</p>
<p align="left">Eventually I came to <a href="http://developer.apple.com/technotes/tn2005/tn2133.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/developer.apple.com');">this tech note from Apple</a>. The reason why Firefox 2 wasn't affected was that Fx2 was not a Cocoa app; it is a Carbon app, and as such was exempt from being subject to coalesced updates.  The key thing showed up in the "last resort" section of that tech note: how to disable coalesced updates for an individual app!  This seems to be available available only on 10.4.4 or later, but that was fine; OS minor updates are free.  I verified that adding the plist entry fixed the problem for me locally, and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=418311" onclick="javascript:pageTracker._trackPageview('/outbound/article/bugzilla.mozilla.org');">checked this in to become part of the build</a>.  See if you can spot when this change hit our performance testing infrastructure:</p>
<p align="center"><a href="http://blog.vlad1.com/wp-content/uploads/2008/02/20080228-talos.png" title="20080228-talos.png" ><img src="http://blog.vlad1.com/wp-content/uploads/2008/02/20080228-talos.png" alt="20080228-talos.png" /></a></p>
<p align="left">Not bad for two lines of XML.</p>
<p align="left">While figuring all this out, I noticed that Safari/WebKit didn't seem to be affected by this framerate cap -- the fps meter when Safari was running the same benchmark happily went up beyond 60fps.  After I found the plist entry, I checked Safari's plist and was surprised to discover that they didn't have this disabling in there.  Doing some more searching, I found <a href="http://www.koders.com/noncode/fidDD6DE07ED9010D40683E1F1C73DEBB67143E40B8.aspx#L293" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.koders.com');">this code in WebKit</a>.  Apparently, there <em>is</em> a way to do this programatically, along with some other interesting things like <a href="http://trac.webkit.org/projects/webkit/changeset/14480" onclick="javascript:pageTracker._trackPageview('/outbound/article/trac.webkit.org');">enabling window update display throttling</a> (though it's unclear what that means!) -- but only if you're Apple.</p>
<p align="left">All these WK* methods are undocumented, and they appear in binary blobs shipped along with the WebKit source (see the WebKitLibraries directory).  There are now over 100 private "OS-secrets-only-WebKit-knows" in the library, many of which are referred to in a <a href="http://trac.webkit.org/projects/webkit/browser/trunk/WebKitLibraries/WebKitSystemInterface.h" onclick="javascript:pageTracker._trackPageview('/outbound/article/trac.webkit.org');">mostly comment-free header file</a>.  Reading the WebKit code is pretty interesting; there are all sorts of potentially useful Cocoa internals bits you can pick up, more easily on the Objective C side (e.g. search for "AppKitSecretsIKnow" in the code), but also in other areas as a pile of these WK* methods used in quite a few places.  Would any other apps like to take advantage of some of that functionality?  I'm pretty sure the answer there is yes, but they can't.  It's not even clear under what license libWebKitSystemInterface is provided, so that other apps can know if they can link to it.</p>
<p align="left">Despite my frustrations with Linux, this type of hiding isn't really possible in a real open source environment.  In the end, I really do hope that Linux can rise to the technical challenge and compete in desktop performance and features, but it's not there yet.  However, I'm glad that there was a workaround for this issue for us on OSX, because the performance benefits are huge --  Firefox 3 on the Mac (everywhere, really) is going to be a kick-ass release!</p>
<p align="left"><strong>Edit</strong>: Slashdot seems to have picked up on this, and in typical style, has completely misunderstood the post.  To be clear, I do not think that Apple is in any way trying to purposely "cripple" non-Apple software.  I also do not think that undocumented APIs give Safari any kind of "significant performance advantage" (as Firefox 3 should show!).  However, as I said, the undocumented functionality could be useful for Firefox and other apps to implement things in an simpler (and potentially more efficient) manner.  I don't think this is malicious, it's just an unfortunate cutting of corners that is way too easy for a company that's not fully open to do.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vlad1.com/2008/02/28/finding-the-os-x-turbo-button/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A few Greasemonkey tweaks&#8230;</title>
		<link>http://blog.vlad1.com/2008/02/19/a-few-greasemonkey-tweaks/</link>
		<comments>http://blog.vlad1.com/2008/02/19/a-few-greasemonkey-tweaks/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 21:27:39 +0000</pubDate>
		<dc:creator>vladimir</dc:creator>
		
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.vlad1.com/2008/02/19/a-few-greasemonkey-tweaks/</guid>
		<description><![CDATA[I've recently rediscovered Greasemonkey, and have used it to make two small fixes that have been annoying me for a while.  A few people have asked, so I thought I'd share the user scripts.  The first does some postprocessing of the tinderbox waterfall page, shrinking the Talos columns by making them use more of the [...]]]></description>
			<content:encoded><![CDATA[<p>I've recently rediscovered <a href="https://addons.mozilla.org/en-US/firefox/addon/748" onclick="javascript:pageTracker._trackPageview('/outbound/article/addons.mozilla.org');">Greasemonkey</a>, and have used it to make two small fixes that have been annoying me for a while.  A few people have asked, so I thought I'd share the user scripts.  The first does some postprocessing of the tinderbox waterfall page, shrinking the Talos columns by making them use more of the large amounts of vertical space.  Here's <a href="http://people.mozilla.com/~vladimir/misc/talosfix.user.js" onclick="javascript:pageTracker._trackPageview('/outbound/article/people.mozilla.com');">the script</a>, and a picture of what the columns look like <a href="http://vlad.off.net/blog-media/tinderbox-old.png" onclick="javascript:pageTracker._trackPageview('/outbound/article/vlad.off.net');">before the script is applied</a>, and <a href="http://vlad.off.net/blog-media/tinderbox-new.png" onclick="javascript:pageTracker._trackPageview('/outbound/article/vlad.off.net');">after</a>.</p>
<p>The second script fixes something that's been annoying me for a while about the Mozilla development infrastructure --- all of our servers have an identical favicon, which means it's impossible to differentiate between different sites (or, most commonly, to find the tinderbox tab) when you have many tabs open.  I blogged about this a while back, before the crash of my blogging machine; I received some good feedback, but my requests to get the icons changed on the actual sites didn't go anywhere.  So, <a href="http://people.mozilla.com/~vladimir/misc/mozillafavicons.user.js" onclick="javascript:pageTracker._trackPageview('/outbound/article/people.mozilla.com');">this script</a> forces favicons for a couple of key mozilla sites, including tinderbox, bugzilla, wiki.m.o, and developer.m.o.  The icons come from the <a href="http://famfamfam.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/famfamfam.com');">famfamfam Silk set and</a> a bit of hackery on my end using <a href="http://pixelmator.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/pixelmator.com');">Pixelmator</a>.  Here's an image of what the result looks like:</p>
<p style="text-align: center"><img src="http://vlad.off.net/blog-media/mozilla-favicons.png" height="27" width="469" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vlad1.com/2008/02/19/a-few-greasemonkey-tweaks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Are You Kidding Me?</title>
		<link>http://blog.vlad1.com/2008/02/15/are-you-kidding-me/</link>
		<comments>http://blog.vlad1.com/2008/02/15/are-you-kidding-me/#comments</comments>
		<pubDate>Sat, 16 Feb 2008 03:04:52 +0000</pubDate>
		<dc:creator>vladimir</dc:creator>
		
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.vlad1.com/2008/02/15/are-you-kidding-me/</guid>
		<description><![CDATA[So it turns out, now that Alice got the awesome nochrome tinderboxes up and running, that the Mac, on raw HTML layout, is about as fast as Windows.  However, on win32 and linux, when you add in the perf hit of drawing the full browser UI (the nochrome boxes just render the HTML in a [...]]]></description>
			<content:encoded><![CDATA[<p>So it turns out, now that Alice got the awesome nochrome tinderboxes up and running, that the Mac, on raw HTML layout, is about as fast as Windows.  However, on win32 and linux, when you add in the perf hit of drawing the full browser UI (the nochrome boxes just render the HTML in a plain window with no widgetry), is on the order of 5%-10%.  On the Mac, it's around 300%.  Clearly there is something very wrong going there.</p>
<p>After some sniffing around, using a very reduced testcase (that I was working with for another performance issue) I came across the Mac native theme code.  Disabling native theme entirely (commenting out all the calls) gave back all the performance.  So I start digging into it.  I collect a bunch of really weird data --- such as, if I replace a call to HIThemeDrawTrack with a loop calling HIThemeDrawTrack 5, 10, 50 times... the overall time spent in the benchmark doesn't change from 1 time.  At 100 times though, it changes drastically.  The delta between benchmark time and raw time spent in NSChildView's drawRect should remain mostly constant with the above changes, one would think.  But it doesn't.  Going from no native theme rendering to turning it on increases the "unknown" time significantly.</p>
<p>I'm still spending time with Shark (which is, I would argue, Apple's best developer tool -- maybe one of the best developer tools, ever), but the latest is completely baffling and what prompted this post.  I finally got around to doing a shark System Trace, which traces at the user/kernel boundary, recording syscalls, preemptions, etc.  In the syscall log, I noticed a bunch of calls to geteuid, getuid, etc., all being repeated.  Looking at the call stack...</p>
<p>... you guessed it.  HIThemeDrawTrack makes syscalls.  For every single call, it calls geteuid, geteuid, getuid, geteuid, <strong>stat64</strong>, <strong>stat64</strong>. That's 4 geteuid/getuids and 2 stats.  <em>For every single call to the theme function.</em> This is ludicrous.  The stack traces indicate that this is because this function seems to pull out user preferences on each call, and then has to check if the preferences should change because the euid may have changed (?!?)... the getuid call is coming from _CFUserName.  Because, you know, drawing a UI element needs to know the <em>user name</em>.  It's probably also allocating the CFString to hold it.</p>
<p>I wish this was a joke, but it's not.  I'm now looking into how to draw this crap faster; the NSCell API may be a better way to go -- we'll see if it has this same damage.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vlad1.com/2008/02/15/are-you-kidding-me/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Uncharted: Drake&#8217;s Fortune</title>
		<link>http://blog.vlad1.com/2008/02/07/uncharted-drakes-fortune/</link>
		<comments>http://blog.vlad1.com/2008/02/07/uncharted-drakes-fortune/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 07:28:07 +0000</pubDate>
		<dc:creator>vladimir</dc:creator>
		
		<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://blog.vlad1.com/2008/02/07/uncharted-drakes-fortune/</guid>
		<description><![CDATA[I just finished Uncharted: Drake's Fortune for the PS3.  Overall, a very well done game; felt a lot like the Tomb Raider series, but with more shooting and fewer puzzles.  I tend to prefer the opposite mix, but with the difficulty set to Easy, the shooting bits weren't annoying.  The story is pretty good, and [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished <a href="http://www.gamespot.com/ps3/action/uncharteddrakesfortune/index.html?tag=result;title;0" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.gamespot.com');">Uncharted: Drake's Fortune</a> for the PS3.  Overall, a very well done game; felt a lot like the Tomb Raider series, but with more shooting and fewer puzzles.  I tend to prefer the opposite mix, but with the difficulty set to Easy, the shooting bits weren't annoying.  The story is pretty good, and the voice acting is the best that I've seen in a game in a long time.  The characters sound and act believable, which is impressive.  Great graphics, no framerate issues, and I never had to load from a saved game -- the checkpoints are well-spaced and if you die, restarting from the checkpoint is instant.  If you're looking for a game to spend an hour with now and then (there are 21 "chapters" that flow into eachother, each one taking probably an hour or so to complete), it is definitely worth a look.  Not a whole lot to say, really.</p>
<p>You're probably not going to see me do too many of these types of posts, mainly because I hardly ever finish games, but I figured I'd start blogging about the games that I've played and do a mini review of sorts.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vlad1.com/2008/02/07/uncharted-drakes-fortune/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
