added time log for encode and building table