There are approximately two ways to handle this problem: (i) mess about with about:config settings in Firefox itself and (ii) install dnsmasq in Ubuntu.
These are some of the about:config settings of concern:
network.http.pipelining [http://kb.mozillazine.org/Network.http.pipelining]
network.http.pipelining.maxrequests
network.dns.disableIPv6 [http://kb.mozillazine.org/Network.dns.disableIPv6]
plugin.expose_full_path
nglayout.initialpaint.delay
content.notify.backoffcount
For an overview of dnsmasq, see “Local DNS Cache for Faster Browsing on Ubuntu Machine”:
http://www.ubuntugeek.com/
local-dns-cache-for-faster-browsing-on-ubuntu-machine.html
For a more extensive view, see “Speed Up Firefox web browser”:
http://www.ubuntugeek.com/speed-up-firefox-web-browser.html