This loop in load_replay is what is taking so long:

Code:
    while (util::portable_get_line(file, line))