<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shawn Wilsher &#187; location bar</title>
	<atom:link href="http://shawnwilsher.com/archives/tag/location-bar/feed" rel="self" type="application/rss+xml" />
	<link>http://shawnwilsher.com</link>
	<description></description>
	<lastBuildDate>Sun, 04 Dec 2011 10:37:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Changes to how Places stores data incoming</title>
		<link>http://shawnwilsher.com/archives/473</link>
		<comments>http://shawnwilsher.com/archives/473#comments</comments>
		<pubDate>Thu, 16 Dec 2010 01:05:16 +0000</pubDate>
		<dc:creator>Shawn Wilsher</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[asynchronous]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[location bar]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[places]]></category>
		<category><![CDATA[SQLite]]></category>

		<guid isPermaLink="false">http://shawnwilsher.com/?p=473</guid>
		<description><![CDATA[Sometime soon after the beta 8 code freeze, the Places team will be merging the Places branch into mozilla-central. There are a lot of changes we’ve been working on, the most important of which is some major re-architecting how we store data. The Benefits The work on the Places branch brings us a number of [...]]]></description>
			<content:encoded><![CDATA[<p>Sometime soon <del>after the beta 8 code freeze</del>, the Places team will be merging the Places branch into mozilla-central.  There are a lot of changes we’ve been working on, the most important of which is some major re-architecting how we store data.</p>
<h3>The Benefits</h3>
<p>The work on the Places branch brings us a number of benefits.  In general, we&#8217;ve parallelized work, and made it substantially less likely that we&#8217;ll block on the GUI thread.  Some of the important fixes we have landed are:</p>
<ul>
<li>Faster Location Bar
<div>The location bar is faster because other database work no longer blocks us from searching, and the queries are much simpler.</div>
</li>
<li>Asynchronous Bookmark Notifications
<div>Indicating if the current page is bookmarked in the location bar (with the star) is now an asynchronous operation that does not block the page load.</div>
</li>
<li>Faster Bookmarks &#038; History Management/Searches
<div>Simpler queries and other improvements should make this all work faster.</div>
</li>
<li>Faster Link Coloring
<div>Link coloring is now executed on a separate database connection so it cannot block other database work.</div>
</li>
<li>Expiration Work
<div>Less work at startup, less work at shutdown, and less work when we run expiration.</div>
</li>
<li>Less Data Stored
<div>Embedded pages are now tracked only in memory and never hit the disk.</li>
<li>Better Battery Management
<div>Much less work during idle time, which will improve our power consumption behaviors.</div>
</li>
<li>Fixes <a href="https://bugzilla.mozilla.org/buglist.cgi?quicksearch=fixed-in-places%20blocking2.0%3A%2B">29 blockers</a> and <a href="https://bugzilla.mozilla.org/buglist.cgi?quicksearch=fixed-in-places%20blocking2.0%3A---">18 other issues</a></li>
</ul>
<h3>A bit of History</h3>
<p>Way back in the days leading up to Firefox 3.5, we moved from storing all of our history and location data in disk tables to in-memory tables that we’d flush out to disk every two minutes off of the GUI thread.  The benefit of this was two-fold:</p>
<ol>
<li>No longer performing the vast majority of our disk writes on the GUI thread</li>
<li>No longer performing the vast majority of our fsyncs/Flushes on the GUI thread</li>
</ol>
<p>More details about how we came up with this solution can be found in a <a href="http://shawnwilsher.com/archives/168">series</a> <a href="http://shawnwilsher.com/archives/169">of</a> <a href="http://shawnwilsher.com/archives/170">blog</a> <a href="http://shawnwilsher.com/archives/172">posts</a>.</p>
<h3>The Problem</h3>
<p>This solution has worked out pretty well for us for a while, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=563538">but recently, especially on OS X, it has not been</a>.  The short story is that our architecture did not scale well due to <a href="http://en.wikipedia.org/wiki/Lock_%28computer_science%29#Granularity">lock contention</a> between our GUI thread and our background I/O thread.  While the common case access case may be fine, the failure case (when we hit lock contention) is pretty terrible.  The problem is so terrible that <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=563538#c55">I once described it</a> like this:</p>
<blockquote><p>the failure case makes us fall on our faces, skid about 100 feet, and then fall off a cliff without a parachute.</p></blockquote>
<p>Ultimately, the only way we can avoid this situation is to not do any database work on separate threads with the same database connection.  It was not an issue in the past because we just did not do enough work on the I/O thread, but as we have added to the workload of that thread, we increase the likelihood of it holding the lock, which means there is a higher probability that the GUI thread will not be able to instantly acquire the lock and do whatever it needs to do.  This essentially leaves us with two options:</p>
<ol>
<li>Move the rest of our database work off of the GUI thread.</h3>
<li>Move database work from the I/O thread back to the GUI thread.</h3>
</ol>
<h3>The Solution</h3>
<p>The second choice is not actually a viable option.  Disk I/O completes in a non-deterministic amount of time, which is why we have been moving it from the GUI thread to an I/O thread since Firefox 3.5.  The first choice is not entirely viable either due to schedule constraints either (we have tons of API calls that are not used heavily but still synchronous).  A hybrid solution exists, however.  We can reduce the amount of work we do on the I/O thread by using additional I/O threads.  Additionally, we can move the remaining synchronous operations during browsing to an I/O thread.  In the end, Places ends up with one read/write thread, and multiple read-only threads.</p>
<p>This wasn’t really an option back in the Firefox 3.5 days because in SQLite readers and writers blocked each other.  However, the SQLite developers recently devised a new journaling method called <a href="http://www.sqlite.org/wal.html">WAL</a> that lets readers not block writers, and writers not block readers.  When the Places branch merges into mozilla-central, we will end up with three read-only I/O threads and our original read-write I/O thread.  The three read-only threads are used for location bar searches, visited checks (is a given hyperlink visited), and some bookmark operations.  Each I/O thread has its own connection to the database, allowing operations to happen in parallel (SQLite is only threadsafe because it serializes all access on each connection object, which is why we had the lock contention in the first place).</p>
<h3>Performance Test Issues</h3>
<p>One of the things that made this work especially difficult is seemingly random changes in performance numbers.  We often had regressions suddenly appear (according to talos) on changesets that would have zero impact on performance, and then backing out the change would cause an additional regression.  Other times, when we would merge mozilla-central into Places, we would suddenly get new regressions when comparing to mozilla-central.  This could be indicative of a bad interaction with our code and the changes on mozilla-central, however after looking at the changes on mozilla-central that landed with the merge, that appeared to be highly unlikely.</p>
<p>I&#8217;m also quite certain that some of our performance tests do not actually test/measure what we actually want to test/measure.  I&#8217;ll leave that discussion to a future blog posts, however.</p>
]]></content:encoded>
			<wfw:commentRss>http://shawnwilsher.com/archives/473/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Swing and a Miss</title>
		<link>http://shawnwilsher.com/archives/305</link>
		<comments>http://shawnwilsher.com/archives/305#comments</comments>
		<pubDate>Wed, 02 Sep 2009 21:48:41 +0000</pubDate>
		<dc:creator>Shawn Wilsher</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[AutoComplete]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[location bar]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://shawnwilsher.com/?p=305</guid>
		<description><![CDATA[When we landed the asynchronous location bar, some people started to see substantially slower results. This was alarming since it was supposed to end up speeding or staying the same for everyone. After some investigation, we realized that the AutoComplete code was doing something very dumb with asynchronous searches. The problem was that the code [...]]]></description>
			<content:encoded><![CDATA[<p>When we landed the <a href="http://shawnwilsher.com/archives/279">asynchronous location bar</a>, some people started to see substantially slower results.  This was alarming since it was supposed to end up speeding or staying the same for everyone.  After some investigation, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=509048">we realized that the AutoComplete code was doing something very dumb</a> with asynchronous searches.  The problem was that the code would not actually handle the user pressing the enter key until the next set of results came in.  Not only did this result in slower processing of the user&#8217;s selection, it also meant that weird race conditions would come up such as up opening a new tab, pasting a url in, press enter, and then switch tabs resulting in the reloading of the page that was just switched to.  In other words, epic fail all around.</p>
<p>Luckily, the fix was trivial.  Now we handle the enter keypress immediately when the user hits it, and not later.  Problem solved :)</p>
]]></content:encoded>
			<wfw:commentRss>http://shawnwilsher.com/archives/305/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Asynchronous Location Bar has Landed</title>
		<link>http://shawnwilsher.com/archives/279</link>
		<comments>http://shawnwilsher.com/archives/279#comments</comments>
		<pubDate>Tue, 11 Aug 2009 20:33:07 +0000</pubDate>
		<dc:creator>Shawn Wilsher</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[asynchronous]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[location bar]]></category>
		<category><![CDATA[mozStorage]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[places]]></category>
		<category><![CDATA[SQLite]]></category>

		<guid isPermaLink="false">http://shawnwilsher.com/?p=279</guid>
		<description><![CDATA[About two weeks ago the asynchronous location bar work landed in mozilla-central without much issue. It&#8217;s also in the Firefox 3.6 alpha we just recently released. This has the potential to impact all of our users, but those on slower hard drives will notice this the most. Your location bar searches may not complete any [...]]]></description>
			<content:encoded><![CDATA[<p>About two weeks ago the asynchronous location bar work <a href="http://hg.mozilla.org/mozilla-central/pushloghtml?changeset=8cff4bd2121a">landed in mozilla-central</a> without much issue.  It&#8217;s also in the <a href="https://developer.mozilla.org/devnews/index.php/2009/08/07/firefox-3-6-alpha-1-now-available-for-download/">Firefox 3.6 alpha</a> we just recently released.  This has the potential to impact all of our users, but those on slower hard drives will notice this the most.  Your location bar searches may not complete any faster than before, but they certainly won&#8217;t be hanging your browser and locking up the UI.</p>
<h3>Background</h3>
<p>We&#8217;ve been getting reports for some time about the location bar hanging the application for some users when they are typing in it.  This wasn&#8217;t a problem that was reproducible on every machine, and even on machines that saw it, it wasn&#8217;t always 100% reproducible.  Clearly, this behavior is not desirable, so we set out to fix it.</p>
<p>I had a theory to the cause almost a year ago and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=455555">filed a bug</a> that I was hoping we could work on and fix for Firefox 3.5.  We knew that reading data off a disk can be slow (and certainly would complete in a non-deterministic amount of time).  Since SQLite uses blocking read calls (no more code can execute until the data is read from disk), this could certainly be the cause of the slowdown our users were seeing.  Some simple profiling showed that this was largely the cause of the hanging.  Work began on the project, but it was clear that enough issues were cropping up that we were not going to be able to safely take this change for Firefox 3.5, and resources were diverted elsewhere.</p>
<h3>Process and Solution</h3>
<p>This section is a bit technical, so feel free to skip it.  The short answer is &#8220;do not block the main thread while reading from the hard drive.&#8221;</p>
<p>In order to not block the main thread while reading from disk we either need to make SQLite use non-blocking read system calls, or call into SQLite off of the main thread.  Changing the SQLite code isn&#8217;t something we want to do, so that solution was out of the question.  Luckily, we had solved a similar problem with writes and fsyncs earlier in the Firefox 3.5 development with the <a href="http://shawnwilsher.com/archives/162">asynchronous Storage API</a>.</p>
<p>The first implementation that we tried essentially did the same thing that the old code did.  We would execute a query, but this time asynchronously, and then process the results and see if they match.  There were two issues with this approach, however.  The first issue was that we were filtering every history and bookmark entry on the main thread for a given search.  That could be a lot of work we end up doing, and with the additional overhead of moving data across threads, the common case would see no win.  The second issue was that once we selected a result in the location bar, and a search was not yet complete, there would be a hang as the main thread processed a bunch of events that Storage had posted to it containing results.</p>
<p>At this point, we realized we needed to do the filtering on a thread other than the main thread.  After some thought, we was figured that the easiest way to do that would be to use a SQL function that we define in the WHERE clause of our autocomplete queries.  This way, all the filtering is done on a background thread, and the code that runs on the main thread only deals with results we will actually use.  This solution exposed some things in the Storage backend like lock contention and a few other subtle issues, but nothing major came up.</p>
<p>For more details on how the location bar search results are generated, see <a href="http://stackoverflow.com/questions/540725/how-does-firefoxs-awesome-bar-match-strings/1208458#1208458">my explanation here</a>.</p>
<p>If you weren&#8217;t having a problem before, chances are you won&#8217;t notice any difference at all.</p>
]]></content:encoded>
			<wfw:commentRss>http://shawnwilsher.com/archives/279/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Test Build: Asynchronous Location Bar (Take &gt;2)</title>
		<link>http://shawnwilsher.com/archives/270</link>
		<comments>http://shawnwilsher.com/archives/270#comments</comments>
		<pubDate>Sat, 11 Jul 2009 22:32:40 +0000</pubDate>
		<dc:creator>Shawn Wilsher</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[location bar]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[places]]></category>

		<guid isPermaLink="false">http://shawnwilsher.com/?p=270</guid>
		<description><![CDATA[I have another test build for folks to try out. This fixes a possible error condition that could happen in certain circumstances. This build has two known issues: There is a lot of flickering when new results show up. This is being tracked in bug 393902. Your computer will hang for a period of time [...]]]></description>
			<content:encoded><![CDATA[<p>I have another test build for folks to try out.  This fixes a possible error condition that could happen in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=455555#c104">certain circumstances</a>.  This build has two known issues:</p>
<ol>
<li>There is a lot of flickering when new results show up.  This is being tracked in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=393902">bug 393902</a>.</li>
<li>Your computer will hang for a period of time (it will become responsive again) if you continue to type once no results are found.  This is being tracked in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=503701">bug 503701</a>.</li>
</ol>
<p>This is built off of a &#8220;stable&#8221; point of mozilla-central, so it&#8217;s like using a 3.6 nightly.  All the normal warnings apply about using it.  I&#8217;m told this greatly increases the speed at which results obtained by many people.  If you experience any issues (other than the two listed here), please let me know!  The <a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-places/">builds can be found here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://shawnwilsher.com/archives/270/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test Build: Asynchronous Location Bar</title>
		<link>http://shawnwilsher.com/archives/266</link>
		<comments>http://shawnwilsher.com/archives/266#comments</comments>
		<pubDate>Thu, 09 Jul 2009 00:30:15 +0000</pubDate>
		<dc:creator>Shawn Wilsher</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[asynchronous]]></category>
		<category><![CDATA[location bar]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[places]]></category>

		<guid isPermaLink="false">http://shawnwilsher.com/?p=266</guid>
		<description><![CDATA[It&#8217;s been a while, but last week I started working on the asynchronous location bar patch again. The add-on from past posts will not be updated as there are binary changes that need to be made. I do, however, have some test builds that you can try out. These are built of off mozilla-central, so [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while, but last week I started working on the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=455555">asynchronous location bar patch</a> again.  The <a href="http://shawnwilsher.com/archives/255">add-on from past posts</a> will not be updated as there are binary changes that need to be made.  I do, however, have some test builds that you can try out.  These are built of off mozilla-central, so it&#8217;s like using a 3.6 nightly.  That means it may not be stable, and you shouldn&#8217;t use this with your default profile (but feel free to copy your places.sqlite file into a new one to really hammer on it).  If you are interested in trying it out, the <a href="https://build.mozilla.org/tryserver-builds/sdwilsh@shawnwilsher.com-try-b70b9b91f7d7/">builds can be found here</a>.</p>
<p>Your feedback is appreciated!</p>
]]></content:encoded>
			<wfw:commentRss>http://shawnwilsher.com/archives/266/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Asynchronous Location Bar Searches</title>
		<link>http://shawnwilsher.com/archives/255</link>
		<comments>http://shawnwilsher.com/archives/255#comments</comments>
		<pubDate>Wed, 11 Mar 2009 21:43:30 +0000</pubDate>
		<dc:creator>Shawn Wilsher</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[leaks]]></category>
		<category><![CDATA[location bar]]></category>
		<category><![CDATA[mozStorage]]></category>

		<guid isPermaLink="false">http://shawnwilsher.com/?p=255</guid>
		<description><![CDATA[For those of you using the asynchronous location bar add-on, today&#8217;s nightly of both mozilla-central and mozilla-1.9.1 should show a reduction in memory use. Turns out there was a bit of a leak in mozStorage that would mean you&#8217;d get high memory usage that would never go down. My bad. For those of your programmers [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you using the <a href="http://shawnwilsher.com/archives/239">asynchronous location bar add-on</a>, today&#8217;s nightly of both mozilla-central and mozilla-1.9.1 should show a reduction in memory use.  Turns out there was <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=482614" title=" mozStorageVariant leaks its internal data due to non-virtual destructor">a bit of a leak in mozStorage</a> that would mean you&#8217;d get high memory usage that would never go down.  My bad.</p>
<p>For those of your programmers out there, I have a word of advice.  Always make sure you have a virtual destructor in your base class.  If you don&#8217;t, you could spend days tracking down a leak that doesn&#8217;t seem to make sense.  Of course, this probably would have been spotted earlier if we <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=469523" title="Enable TUnit leak log in tinderbox (log)">reported leaks in xpcshell unit tests</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://shawnwilsher.com/archives/255/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Test Add-on: Asynchronous Location Bar Searches (Take 3)</title>
		<link>http://shawnwilsher.com/archives/239</link>
		<comments>http://shawnwilsher.com/archives/239#comments</comments>
		<pubDate>Mon, 23 Feb 2009 04:41:11 +0000</pubDate>
		<dc:creator>Shawn Wilsher</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[location bar]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[places]]></category>

		<guid isPermaLink="false">http://shawnwilsher.com/?p=239</guid>
		<description><![CDATA[It seems as though the past builds still had issues on Windows. Mook was kind enough to get be a stack of the hang on shutdown folks were seeing, and I&#8217;ve modified the code to avoid making that happen (still not sure why it happened, but I know how it could get there &#8211; bug [...]]]></description>
			<content:encoded><![CDATA[<p>It seems as though the <a href="http://shawnwilsher.com/archives/236">past</a> <a href="http://shawnwilsher.com/archives/230">builds</a> still had issues on Windows.  Mook was kind enough to get be a stack of the hang on shutdown folks were seeing, and I&#8217;ve modified the code to avoid making that happen (still not sure why it happened, but I know how it could get there &#8211; bug is filed).  Without further delay, here&#8217;s an <a href="https://services.forerunnerdesigns.com/extensions/get/async-location-bar-test@forerunnerdesigns.com/0.12/">add-on that you can try out with the latest fixes in</a>!  I&#8217;ve been told on irc that this one works much better on Windows.</p>
]]></content:encoded>
			<wfw:commentRss>http://shawnwilsher.com/archives/239/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Test Build: Asynchronous Location Bar Searches (Take 2)</title>
		<link>http://shawnwilsher.com/archives/236</link>
		<comments>http://shawnwilsher.com/archives/236#comments</comments>
		<pubDate>Sun, 22 Feb 2009 06:01:11 +0000</pubDate>
		<dc:creator>Shawn Wilsher</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[location bar]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[places]]></category>

		<guid isPermaLink="false">http://shawnwilsher.com/?p=236</guid>
		<description><![CDATA[It turns out that I neglected to make the all-important packages-static file changes that would actually result in a build that works for most folks in my previous test builds. I thought I had fixed that with the last build, but apparently I never submitted it to the try server (I had the line in [...]]]></description>
			<content:encoded><![CDATA[<p>It turns out that I neglected to make the all-important packages-static file changes that would actually result in a build that works for most folks in my previous test builds.  I thought I had fixed that with <a href="http://shawnwilsher.com/archives/230">the last build</a>, but apparently I never submitted it to the try server (I had the line in my terminal all ready to just press enter though!).</p>
<p>Without further delay, <a href="https://build.mozilla.org/tryserver-builds/2009-02-21_20:53-sdwilsh@shawnwilsher.com-try-1bb16971859/">here is the new test build</a>.</p>
<p>I&#8217;ve also made a <a href="https://services.forerunnerdesigns.com/extensions/get/async-location-bar-test@forerunnerdesigns.com/0.11/">handy little add-on</a> that lets you test this out.  I haven&#8217;t tested this add-on extensively, but it should work out OK.  If you think you see a bug, try the test build first before reporting it please.</p>
<p>Still want your feedback on if you think the results are faster, slower, or about the same, so please follow-up!</p>
]]></content:encoded>
			<wfw:commentRss>http://shawnwilsher.com/archives/236/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Test Build: Asynchronous Location Bar Searches</title>
		<link>http://shawnwilsher.com/archives/230</link>
		<comments>http://shawnwilsher.com/archives/230#comments</comments>
		<pubDate>Fri, 20 Feb 2009 04:01:56 +0000</pubDate>
		<dc:creator>Shawn Wilsher</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[location bar]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[places]]></category>

		<guid isPermaLink="false">http://shawnwilsher.com/?p=230</guid>
		<description><![CDATA[A few months ago I decided to try to use the asynchronous storage API that was added in Firefox 3.1 to help reduce the pain of disk IO on the main thread. Sadly, it became quite apparent that this was going to be too big of a change and need to much work to make [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago I decided to try to use the asynchronous storage API that was added in Firefox 3.1 to help reduce the pain of disk IO on the main thread.  Sadly, it became quite apparent that this was going to be too big of a change and need to much work to make it into 3.1, so I put off doing any more work on it.  However, this week I started working on the patch again, updating it to work with the changes to the location bar and the storage back-end.  Today I finally got it passing all of our existing tests (although, I know of at least one condition where it fails and is untested).</p>
<p>Now that it&#8217;s passing all tests, I feel comfortable posting a test build for folks to try and see if it helps or not.  I should note that the current implementation is pretty dumb and doesn&#8217;t take many opportunities speed up results.  Additionally, there are some other performance wins that are on my mind that become a lot easier to do with this newer implementation.</p>
<p>Admittedly, I haven&#8217;t benchmarked this yet, so I don&#8217;t know how it compares to the existing code.  During causal use, however, it feels no slower than the existing implementation, but I don&#8217;t usually have issues with it.  The goal here is to help out those who do have performance issues with the location bar.  In fact, that&#8217;s exactly the feedback I&#8217;m looking to get.  So, if you are feeling ambitious and willing to live on the wild side for a bit, I&#8217;d like you <a href="https://build.mozilla.org/tryserver-builds/2009-02-20_17:53-sdwilsh@shawnwilsher.com-try-4758fef1cb9/">try this test build</a>.  After a little bit of use, let me know if you think the results are faster, slower, or about the same.  Note: this is build off of mozilla-central, so it&#8217;s like a 3.2a1pre build.</p>
<p>Your feedback is greatly appreciated!</p>
]]></content:encoded>
			<wfw:commentRss>http://shawnwilsher.com/archives/230/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

