Pragmatic Paddy

April 27, 2007

Delving into the Firefox source code

Filed under: javascript, programming — Paddy Mullen @ 5:09 pm

Continuing from the previous post. I downloaded the Firefox source code and started trying to figure out why textContent was faster than innerHTML.

The FF source code is a daunting beast, around 57,000 files. I started with grep. this returned 57 files for innerHTML and 72 files for textContent. I then used comm to see which files had both words in them, only one did.

Somehow I decided to try looking at the idl files that grep returned. From these files I was able to figure out what I thought were the .cpp files related to the properties.

Here are links to the files on Mozilla’s website
innerHTML is found in this file
nsGenericHTMLElement.cpp
Here is a changelog of the setInnerHTML function
http://lxr.mozilla.org/mozilla1.8/ident?i=SetInnerHTML

Here is the cpp file that contains textContent
nsHTMLOptionElement.cpp
here is the changelog of the setText function
http://lxr.mozilla.org/mozilla1.8/ident?i=SetText

I haven’t actually yet figured out what each function does, but I’m getting there. I’m also not sure if I have the correct file for textContent.

speed of innerHTML vs textContent

Filed under: javascript, programming — Paddy Mullen @ 4:52 pm

April 23, 2007

I made Dstillz’s interesting chat list

Filed under: humor — Paddy Mullen @ 4:12 pm

An interesting site about music production

Filed under: Uncategorized — Paddy Mullen @ 4:10 pm

April 10, 2007

I’m not going to be a nice blogger.

Filed under: blogging, tech scene — Paddy Mullen @ 9:56 am

April 2, 2007

Why I chose to be a programmer

Filed under: programming — Paddy Mullen @ 1:04 am

Powered by WordPress