Why is Serial.parseInt() so slow?

chrisspurgeon:
OK, that works for a second. For instance if I send the string "4f" the 4 value is picked up by the code instantly. But then something odder happens. A second or so later the parseInt() function spits out a value of zero. Where is that coming from? It happens whether or not I append a line ending character in the serial monitor. What's going on now?

Look at the source to parseInt() and you'll see it says in the comment "zero returned if timeout"

You have the source to all of the Arduino code, its an open source project, its instructive to delve
around in it.