Better Memory Management Tools for Web Apps Coming Soon


Developing a “web 2.0″ application brings with it a host of new challenges previously unfelt or easily ignored with older, single-page-load-per-action apps. The browser has evolved from a simple page renderer to an application platform that busily executes JavaScript and receives, parses, and displays loads of new data without ever leaving the page. Developers are now struck with the challenge of ensuring their applications manage memory properly and efficiently—your JavaScript can leak memory, killing the user experience on your site, but also impacting the user’s complete experience with their system across the board.

To date, it’s been a bit of a struggle to manage memory, since developers are essentially forced to rely on their operating system’s memory managers to even monitor the memory usage of their browser. Even then, testing can be frustrating, as Firefox, for instance, stores all tabs in the same process. Google Chrome is multi-threaded; each tab is its own process. Chrome also features its own built in task manager, so you can identify which page is using exactly how much memory, CPU, and bandwidth. Even at its most detailed, the stats available only show aggregate memory and virtual memory usage—these abstract figures make troubleshooting individual pieces of your code difficult to say the least.

The folks over at Mozilla’s Developer Tools Lab are looking to change that by building a memory analysis tool that helps devs understand exactly how their application is using memory, and the behavior of the cycle (garbage) collector:

We plan on the initial implementation of this tool to be simple. For memory usage, we want to introduce the ability to visualize the current set of non-collectible JavaScript objects at any point in time (i.e., the heap) and give you the ability to understand why those objects aren’t collectible (i.e., trace any object to a GC root). For the cycle collector, we want to give you a way to understand when a collection starts and when it finishes and thus understand how long it took.

Ben Galbraith and the team are soliciting help and feedback, so if this is an issue you’ve had to deal with in the past, make sure you comment.

A New Memory Tool for the Web | Ben Galbraith’s Blog via Ajaxian

Reblog this post [with Zemanta]

Posted in: Cool Stuff, Development

Lunascape Multi-Rendering-Engine Browser Review: Verdict—Three Trick Pony

lunascape Lunascape is a new browser that allows you to switch rendering engines on-the-fly. Internet Explorer, Firefox, and Google Chrome/Apple Safari all use different rendering engines and JavaScript engines to display your pretty web pages to you. This is the root cause of browser incompatibility issues—different engines interpret things (like web “standards”) differently and so you see pages display differently. This is the bane of a lot of developers, as we have to fight the many, many quirks that abound when we use certain parts of the DOM or certain JavaScript or CSS tricks. For a lot more on these issues, QuirksMode is a great resource.

Lunascape presents an interesting product, though one that’s only in the Alpha stage, so I’m sure we’ll be seeing a lot of things evolve from them. As a developer, I have Firefox, Internet Explorer and Google Chrome all installed and at the ready. It’s pretty simple, though a bit annoying, to boot up IE to make sure a page renders properly, even though we develop under Firefox.  (There are FF extensions that make this a simple right-click affair, however.) Lunascape simplifies the process a bit by allowing you to switch a tab’s rendering engine just with a right-click. And it works, for sure.

But I begin to question the utility of a browser that lets me switch rendering engines, but provides me with very few debugging tools or console access. We develop under Firefox because of things like the Web Developer extension and Firebug. These superb debugging tools let us delve into the DOM and help us identify our many AJAX transgressions. Without these tools, though, the workflow isn’t improved enough to justify a switch from just running the browsers separately.

Now, Lunascape currently supports IE extensions, so perhaps Firefox extension support is on the horizon… but this seems like something that could be very difficult to accomplish, given that XUL (which powers Firefox and the window chrome surrounding it) is a part of Gecko that exists a bit existentially to the site being rendered: Though, if Lunascape itself is XUL-powered, then that would help considerably.

Even still, the appeal just isn’t there for me. Lunascape clearly is betting on its three-trick-pony concept, but that only appeals to developers who know what a rendering engine is. Firefox is a considerably better browsing option for regular end users, so they’re left needing to improve the value proposition for developers and to give us a reason to switch. And they haven’t done that yet. One way they could start is by offering advanced debugging tools, better if they’re rendering engine-specific. Another might be to allow for regression testing in IE: Allowing us to render in older IE engines, like how IETester works.

For now, I plan on leaving this in the Alpha bin it came in and working with FF 3, Chrome/Safari and IE, side-by-side.

See also: TechCrunch & Lifehacker‘s coverage. (The latter, whose screenshot we borrowed.)

Posted in: Development, Reviews

Firebug Working Group Created; John Resig Joins It

I linked to John Resig’s post on what he loves about Firebug and what’s next for the tool earlier this month. John Resig works on/created JQuery and is an active developer at Mozilla.

So it’s fitting that today he announced the creation of the Firebug Working Group to consolidate development on the tool, and that he’d be spending 50% of his Mozilla time on Firebug.

This is great news, as John is very clearly brilliant and has some great ideas for the future of the tool.

[via Ajaxian]

Posted in: Tech News

The IE Temptation: Phasing Out Internet Explorer 6 Support

Internet Explorer 7 represented a step forward for “mainstream” browsing. Microsoft worked to fix a lot of the epic fails in CSS implementation that IE 6 had brought upon itself and those around it. There are a few departures from the standards and further from how Firefox handles things, but they’re farther and fewer in between and don’t impact us *too* much on a day-to-day.

Still, instead of developing for Firefox and Internet Explorer, we’re developing for FF, IE6 *and* IE7. Cheers. Add to the fact that IE6 has some serious flaws including its lack of transparent PNG support without getting all hacky, different JavaScript implementations and limitations on what you can do with AJAX calls, et cetera, and it becomes a significant burden to develop for. It doesn’t help that you can only have one version of IE installed on a Windows-machine, or the other, without, again, getting terribly hacky. Just watch your workflow take a hit there.

Read More »

Posted in: Design, Development

Free Software and Open Source Alternatives to Save You Money

The development for open source software is strong and growing. Open source software is software in which the source code is publicly available for examination or contribution. If you talk to a typical person or business, you’ll usually find that their computers are all running Windows and have Microsoft Office installed. Some may even have more expensive software installed like the Adobe Creative Suite applications. By buying and using such high-priced software, it is easy to shell out two or three times as much money on software than on the computer itself. With many capable alternatives, there is a lot of money to be saved by utilizing free and open source software.

Read More »

Posted in: Cool Stuff, How To

The Software I Use

Chris is threatening to take away my shiny new workstation if I don’t make a blog post, and while we’ve got some interesting stuff in the pipeline, it’s not quite ready yet. Instead, I will make one of those generic posts that every blogger at some point makes: the list of software I use.

Read More »

Posted in: Cool Stuff

Workaround to Gmail Manager Firefox Extension

Ever since we made the switch from hosting our own mail servers to using Google Apps for Domain, one of the Firefox extensions that I use on a daily basis is Gmail Manager. It allows me to easily view the inboxes for various email accounts that I monitor and gives me the ability to quickly launch any of those accounts into a new tab. The only problem is that the extension author hasn’t made any updates to it since 2007. While this wouldn’t normally be too big of a problem, Google in their infinite wisdom has decided to rename the username and password login inputs.

The result of the name change by Google caused the extension to stop retrieving email and auto-logging me in to the accounts. It wasn’t until I got suspicious of the fact that it didn’t appear that anyone was emailing me for a few hours that I decided to manually log in and investigate. Once I determined that the extension had broken, I went to work trying to track down an updated version or a quick fix to get it back in action. What I found was a forum for the extension with over 100 pages of messages in it.

Read More »

Posted in: Rants

A workaround to the WordPress 2.5.1 bug

Recently we upgraded our blog to WordPress 2.5.1 and have been battling a horrible bug ever since. When we save or edit a post most of our content is sometimes lost. Unfortunately, it isn’t occurring with enough frequency for us to track down the specific cause of the problem and we have enough projects lined up over here to keep us from digging through the WordPress code ourselves to solve it in any reasonable time. So we’ve opened up a ticket in WordPress’ bug tracker that outlines the problem in more detail and continue to wait for a response from someone on the dev team to let us know what might be the culprit.

In the meantime, the fear of not knowing if your post would be lost when saved forced us to saving the content to notepad before publishing. This is a less than useful solution to the problem because even doing this it seems that once a post starts truncating itself upon saving, it continues to do it every time. The only solution is to delete it and start anew. [We're noticing the problem crops up most often when another user edits an entry not their own. It truncates the post arbitrarily and then proceeds to reject contributions to that post past the truncated length. Needless to say, the frequency and creativity of expletives uttered in the office has spiked dramatically.—Ed]

So today, I took some time to hunt down remote posting solutions that allowed us to save our posts without needing to log in to WordPress directly. ScribeFire was the first solution I tried and has turned out to be an incredibly useful tool. ScribeFire is a FireFox extension that allows us to create posts directly in FireFox and saves them to our blog via the WordPress API.

There is still some functionality lacking: the ability to change post author, adding excerpts and making use of some of the plugins that modified our post entry page to name a few. But we see their release schedule to be rather efficient and hope to request some features that make it into the next release (or until WordPress identifies the problem that forced us to this solution in the first place). [It should also be noted that the extension on the whole is rather impressive considering that it's blog-engine agnostic and works for many different providers.Ed]

Posted in: Rants