llog_changelog_cancel() processing changelog records one by one with llog_changelog_cancel_cb(). The callback decides should this record be deleted base on index at record and cookie from a caller. Since indexes at changelog records are incremented by one, and llog knows max number of records at plain llog, it is easy to calculate current plain llog file would be deleted completely or not. So logic could skip canceling record one by one in this case and delete plain llog file immediately. Plain llog file limited with 64k records, so improvement would help at massive purging, when caller cancels +65k records at once, or cancels all records.