[RCD] imap_root patch (significant speedup)