This file is basically the same code as in prototype2.html, but with
more function calls to generate HTML of each line (similar to what
Firebug currently does) in order to test the performance impact.
The generation of all lines takes ~20% time using this approach.
Cut-and-paste friendly (version #2b)
Buffered viewport (reduces flickering when scrolling to near locations)
Fast line insertion/deletion (documentFragment and element.replaceChild)
Faster rendering
Now we are repositioning/resizing elements much less frequently.
Only the sourceBuffer needs to be positioned (there are no padding
elements), and it needs to be repositioned only when scrolling up.
Elements are resized only when the size of the viewport changes (when
Firebug's UI is resized), but not when it is scrolling.
The width of the "line number bar" (the gray stuff) is being computed
via CSS which reduces a lot the reflow when scrolling.