Tuesday, December 8, 2009

Ezbl 0.3!!

After many long hours, I have finally reached a new milestone in the development of Ezbl! Check out the user-visible part of the changelog for version 0.3:

User-visible Changes:

* Automatically-resizing xwidgets

If you change the size of the window containing a browser window, Ezbl will
automatically resize the xwidget to fit the new size.

* Cookie handler

Ezbl is now able to honor cookie PUT and GET requests from Uzbl, using Uzbl's
(relatively) new "talk_to_socket" system. This means that it is not having to
spawn a Python process for each and every cookie on every page you visit, but
is talking over a UNIX domain socket (which is fast).

This, combined with the new event system has enabled the following:

* No more handler.py script

Ezbl is now 100% Emacs Lisp, and does not need to launch external processes
(aside from Uzbl, of course :). This is largely achieved through the new
event-manager system, which lets Uzbl notify Ezbl of changes and events over
Standard Output, making for a very quick communication.

* Much faster performance

This is largely related to the event and cookie handlers, but it bears
repeating. In a few tests of loading yahoo.com, Ezbl would take about 30
seconds to finish loading the page. That time has now shrunk to just over 2.5
seconds. By using the event manager to let Uzbl notify us of changes, rather
than querying and polling, the amount of dead-time has decreased
dramatically. One commit in particular (d99f336) is responsible for the
majority of this speedup.

* New Emacs dependency

Uzbl uses a special kind of socket type (SOCK_SEQPACKET) for its cookie
handlers, and Emacs doesn't support such sockets (before 23.2, which I helped
to add), so you will need to build a custom version of Emacs, available here:


Note that you need the "xembed" branch of that repository.

Performance has increased by about 10-fold (from "dismal" to "pretty good"), and most of it is due to a single, one-line commit. It truly is the little things that make all the difference.

As an example, loading Yahoo.com took about 30 seconds in the bad old version and it now takes just over 2.5 seconds to do the same thing, while remaining much more responsive during the whole load.

Anyway, it is getting to the point where it is starting to be actually useful (though without keyboard support, it still isn't ready to replace Firefox), which is really cool! The biggest limitation at this point is that it requires patches to Emacs that are not currently in any released version (though my SOCK_SEQPACKET patch is scheduled for 23.2!), so it isn't something you can just download and play with right away. I'm working with the people involved to try to get the relevant pieces in line so that experiencing the latest and greatest browsing system for Emacs isn't quite so big of a burden.

Once again, comments are always welcome, and definitely let me know if you have given it a try!