resolve_all_delayed now about 3 times faster. Still not good enough,
though.