rewrite getline() to avoid double-copy. it's read(2)-based now instead of fgets(3)-based, does all buffering itself and is considerably faster that way. Note that we spend a _lot_ of time in it while parsing the map - for large deltas the map can easily be *big*.