Archive for November, 2007

Writer’s Guild Strike - “Speechless” Campaign

November 23, 2007

A lot has been written lately on the Writers Guild of America strike. John Rogers sums the details up pretty well. I’m sad to see that things have come to this point. I for one will miss all the great TV they write for if the strike continues much longer. They’re doing the right thing though and I fully support them.

They’re launching a public service announcement campaign called “Speechless

Here is Episode #1: Holly Hunter

For more information on the strike see United Hollywood.

Rock Band

November 21, 2007

Rock Band

My copy of Rock Band Special Edition for the Xbox 360 got here yesterday. This giant box came with the game, a (wired) guitar, drum set and microphone.  Oh, and also a USB hub!

I took the game over to Vlad’s place and hooked up the drums there. Having not spent as much time playing Guitar Hero II/III as others I know, I opted to let Vlad play guitar while I tried to learn the drums. Having never played real drums or real practice drums, it seems to me that the drum set is pretty nice. The drum sticks feel like the cheapest pieces of wood they could find — I’ll probably replace them. I find the pedal pretty hard to use, especially when I need to double tap it. Would be nice if I could hook up a second pedal for my other foot. I was doing OK on the medium difficulty, but when I tried expert I maybe hit one or two beats before it failed me out.

After drumming for a while, and ignoring the pleas of Vlad, I hooked up the microphone and tried the vocal part out. The game doesn’t seem to recognize words at all, so if I can sing “blah” for every word in key it seems happy. Staying in key isn’t the easiest on some of the songs. They often jump from lows to highs and back. I did pretty well on medium but had a pretty hard time on hard. Haven’t yet tried expert. It helps that many of the songs I’m already familiar with and have been practicing in the shower and in my car for a long time. The singing part is fun, but after singing about 10 songs my throat is pretty sore.

I played one or two songs on the guitar on medium and it felt pretty easy. Vlad claims that expert is more like Guitar Hero’s hard. Maybe I’ll stand a chance if I practice!

I’m digging the song list in Rock Band more than I did Guitar Hero II. Less metal. While “Trogdor” was a pretty awesome bonus track in GH2, I’m not sure it compares to Rock Band’s “Timmy and the Lords of the Underworld.”

malloc replacements?

November 21, 2007

We’ve built some great tools lately including one to test fragmentation of different allocators.  I’m currently in the process of hooking up allocators such as tcmalloc, nedmalloc, Hoard, and jemalloc.  Also native platform specific ones such as the Windows low-fragmentation heap. I’m having to dig in to some of their internals to pull out the data that we need which is taking a bit of time, but things are progressing well.

If anyone knows of other allocators we should be looking at, would you please leave a comment?  I would like to make sure we’re comparing all of our options.

Amazon Kindle

November 20, 2007

Amazon Kindle My Kindle arrived today. I’ve been wanting to jump in to the ebook game for a while but the lack of easy content has stopped me. Good thing I ordered it yesterday as they’ve sold out already. I’m sure others will write more in depth reviews, but here my current thoughts after half a day of use.

I’d like to start off by saying that I think they did a great job with the box it comes in. It is shaped like a book and looks quite nice. It even has little elastic string around a button to hold it closed.

Like everyone else, I thought the device was going to be pretty ugly from the pictures online. When it arrived I was pleasantly surprised. While there is certainly room for improvement in the looks department, the device is nice and solid. It has a nice rubber grip on the back and feels really nice in my hands. When holding it, my hands cover up the keyboard and my eyes don’t focus on it at all.

John claims that the silver scrolling thing to the right of the screen is alien technology. I’m not sure I can disagree. I have no idea what technology they use for it but it looks cool. The way you use the scroll wheel takes a bit of getting used to, but I find it works well. You can use it to annotate lines of text, highlight them, dictionary lookups, etc. It feels like you should be able to scroll the text with it, but you have to use the next page buttons.

The dictionary function is awesome. You can scroll to a line, click the scroll wheel, select lookup from the menu.  This function isn’t very fast, so after you wait a few seconds it will show you definitions of all the words on that line using the built-in Oxford English Dictionary.  For those of us not so good with the big words, this is huge.

When you buy something on amazon.com it is on your device almost instantaneous. The EVDO wireless is fast. Probably faster than the EDGE on my iPhone. I kind of wish there was a shopping cart for kindle content so that I could add all the things I’m interested in and then move them around like I do in more normal Amazon cart. They currently only support one-click purchasing which could lead to me racking up some big bills.

The screen is great for text. The E Ink folks deserve a lot of credit. Sadly the screen only does 4 shades of gray which results in many images look pretty bad. I’m sure future revisions will make this a lot better. Flipping pages is pretty fast. It does clear to black while flipping pages so there is a weird effect but when reading something I stopped noticing it. When searching on the device in the store, the keyboard is a little laggy. I’m not sure if this is due to the screen or the OS or what, but it isn’t the end of the world. I look forward to a color screen some day.

The web browser on the device is kind of crappy for general browsing, but works fine for things like Wikipedia which you can use for free.

Since Amazon is offering 14 day trials for all their subscription content on the Kindle, I’ve signed up for Time magazine. I will probably give one of the newspapers a shot in a week or two when I have more time to read it, but I expect with the frequency that news changes, the web might be a better source. I would like to see some additional magazines such as The Economist show up, but until then I’ll probably find myself using the device mostly use it for books.

I was concerned about how I would get new content while overseas or in an area without EVDO coverage, but I found out you can download the books from your Amazon Media Library and copy them to your device via USB. This might be enough for those outside the US who want the device and content.

So far I’m very pleased with my device. It came knowing my name which was pretty neat. Version two will no doubt be better in many ways, but this is a great version one. I’ll do a follow-up in a couple weeks after I’ve had more time to use it.

Firefox 3 Beta 1

November 19, 2007

Beta 1 is out. Hurray!

I’ve been working on Firefox 3 stuff for over two and a half years now. Back in March 2005, after GDC, I started to put together what would become the new graphics API in Gecko (”Thebes”). Ignoring the alphas, this is the first real release that includes the graphics, text, fonts, memory, and performance work that I’ve done for the last while. Things are coming together well.

There are plenty of new features, but I’ll admit I’m pretty excited about two core platform things:

  1. Vastly improved font selection and complex script support.
    - I’ll be going in to more detail than you probably wanted to know on the improvements here soon.
  2. Color profile support for images and CSS colors
    - This is disabled by default currently. We still need to add prefs for it. Set gfx.color_management.enabled to true in about:config and restart the browser to enable.

Both of these are fairly subtle improvements but should both make a big improvement to large sets of people.

While I’m really excited about this milestone, I think the memory work currently going on will make the next couple betas that much better.

Domain mapping with wordpress.com

November 19, 2007

http://blog.pavlov.net/ is finally working. As I mentioned previously, I switched my blog from my own MovableType install to a hosted wordpress.com account. I got everything imported easily but I’ve had a problem getting my subdomain mapping properly. WP.com tries to verify that the subdomain is setup properly before allowing you to continue, but it was refusing to verify mine which was correct. I’m not sure if the nice support folks were able to figure out what the problem was or if they just bypassed the verification, but I’m finally setup. They were very helpful!

Everything is running smoothly. I’ve been using wordpress.com for about a week now and am quite happy with my choice/. Everything is much faster than my MovableType install ever was. Everyone is well done — the blog editor, stats, and comments especially.

I don’t have any experience with installing my own WordPress setup, but if you’re looking to get your own blog I would highly recommend taking a look at wordpress.com.

Gaming Madness

November 18, 2007

Long long ago I used to have time to play video games all the way through. I can almost remember those Final Fantasy games that I put hundreds of hours in to. These days I seem to pick up games with intentions to play them all the way through but I find that happening less and less these days.

Most recently I picked up Assassin’s Creed. With Thanksgiving week coming up, I’m hopeful that I can actually finish it. Maybe then I can get to the big stack of games waiting for my attention. Lets see… I’m about halfway through Bioshock. I’ve got Halo 3 and Blue Dragon sitting here still in their plastic wrappers. Forza Motorsport 2 I played for a week or two and just haven’t gotten back to it. Oh, and Guitar Hero II (I did manage to avoid buying GH III) — I made it most of the way through the medium difficulty. I’d love to get back to Zelda on the Wii. I enjoyed it while playing it, but for some reason I stopped playing it and never got back to it.

I recently built a new PC and was playing a good bit of Team Fortress 2 and Crysis, but about two weeks ago my motherboard died. I just got around to RMAing it today. Would like to get back to playing TF2.

Rock Band comes out next week as does Mass Effect… I hate not finishing games that are fun. What am I to do?

Less fragmentation coming in Firefox 3

November 15, 2007

I’ve had a lot of people ask whether the memory improvements that I’ve been doing recently will make it in to Firefox 3 or if they’ll only appear in a more future release.

The basic answer: many of these fixes will be included in Firefox 3, but not all of them.

The more complicated answer is that we’re still analyzing the problem and working on solutions. At this point, we’re still digging through the data and finding hotspots. We’ve already identified quite a few places where we will be able to make improvements — some big and some small — and we’re evaluating each for overall invasiveness and impact so we can make the best decisions possible about how and where to implement these fixes.

As we’re already in the beta phase for Firefox 3 we have to be very careful not to add too much risk to the process, so we’re prioritizing memory improvements to get the biggest improvements for the least additional risk. This isn’t to say that we won’t work on fixes with higher potential risk, but we do have to be very careful. What this means is that we won’t be able to address every single issue, but should be able to knock out the big ones in time for Firefox 3.

Eliminating memory fragmentation entirely is almost impossible. We’ve got some amazing tools built now to debug the issues and test our progress. We’ve got several big issues on our radar that we believe will give us big wins. The current plan of attack is to reduce numbers of allocations, group allocations of similar lifetimes together in to pools, move areas with similar size allocations in to their own areas in memory, and to look at general malloc replacement solutions. We’re looking at all of these things in parallel and have some data on each but not enough to report anything useful yet. I hope to have some good data on each of these areas by early next week. We’ve built some pretty amazing tools for testing our progress and will be able to show visually how we’re improving.

With as many of these fixes going in to Firefox 3 as possible, Firefox 3 should provide significant improvement in long term memory use over previous versions.

Leaks? Memory? We never forgot about you.

November 14, 2007

I’ve seen quite a few posts lately based on the memory fragmentation work that I’m doing with titles such as “Fixing Firefox’s memory issue becomes a priority.” Others have claimed that this work is a result of Mozilla’s new focus on mobile. While I’m glad that people are paying attention to our memory work and offering great suggestions, let me say: Memory issues have always been a priority.

Since I started working on the project in 1998 we’ve always had a focus on keeping our memory footprint small and keeping leaks to a minimum. Early in the development cycle for each release we’ve set goals for memory and performance. We always set our bar under the previous release. I’ve found that developing desktop software is a pretty constant balancing act between performance and memory use. We’re always making trade-offs and we try our best to chose the things that will work best for the largest set of users:

Some examples:

  • Back in 2001 when I rebuilt our imaging library, I made several decisions to use more memory to store images results in faster rendering; optimizing for memory use reduces the speed at which was can display pages. We’ve looked at these issues many times over the years to make sure they were still correct. Recently we’ve adjusted that behavior to not keep full uncompressed images around as long which will result in memory savings but will cause initial scrolling to be a bit slower on documents you haven’t accessed in a while.
  • In Firefox 1.5 we added a feature called the back/foward cache which keeps documents in your recent history that you’ve navigated from in memory. This was done to significantly speed up hitting the back button. It worked great but caused us to use a bit more memory. We made sure that it was only using memory your computer wasn’t already using, but again, it’s an example of a trade-off. We started off with a pretty high number of pages that we kept in the cache and have continued to adjust that number to keep a more limited set of pages to help prevent unnecessary bloating. We’ve also started expiring these pages over time so that you don’t keep pages around you probably aren’t going to use.

With the popularity of extensions rising, we started hearing complaints about memory leaks. We took these reports pretty seriously and have spent a lot of time investigating what is going on. A lot of work has gone in over the last few years to reduce these leaks. Most of our early testing was around the browser, without extensions. Our investigations showed that certain extensions in caused a pretty bizarre class of leaks that were pretty difficult to fix given the architecture in Firefox 2. We fixed as many of them as we could in Firefox 2 but some we were unable to fix. In Firefox 3 some Really Smart People (graydon, peterv, dbaron, etc) have built this thing called the cycle collector in to the core which addresses many of the leaks that we were seeing from extensions (as well as leaks from other places that were of the same class). Our extensive testing shows an occasional leak here and there and we are working to fix those, but in general we aren’t seeing many leaks anymore.

It is only after we’ve gone through so many leak fixes and done so many other memory reduction fixes that we’ve needed to a deeper look at what is going on under the hood. We’ve long had suspicions that we were being hurt by memory fragmentation, but it wasn’t until recently that we had built good tools to fully diagnose the problem.

I’ll assert here that the way people use their browsers has changed. When Gecko was originally designed back around 1998 people had one, maybe two browser windows open without tabs, and they certainly didn’t have any extensions installed. I look at my browser windows now and I’ve got 3 browser windows open with a total of about 20 tabs open. That is 10x the number of documents open at once!

With the change in how people use their browsers, there is no doubt that they’re going to use more memory. We’re doing everything we can to minimize the impact of having lots of documents open. Many people are trying to shave off bytes here and there. Just in the last week we’ve removed over 200 thousand allocations just from startup and first page load. We’ve got a great community and people eager to solve these problems. We’re now equipped with data and ready to fight this battle.

Stay tuned…

WordPress…

November 13, 2007

I’ve grown a little tired of hosting my own blog so I’m going to give wordpress.com a shot. This had been a long time coming and with the recent extra amount of comments/hits I’ve been hitting, I realized I probably shouldn’t be running versions of blogging software with known security holes. Given that and my lack of time to keep things updated, a hosted solution seemed like a good plan.

I’ve added lots of redirects so hopefully nothing breaks. If anyone runs in to something they can’t find please let me know! The new official URL will be http://blog.pavlov.net/ which will be working hopefully tomorrow.

I’m hopeful that everything continues to work well.