Reduce editor initial layout time by first removing doc selection

This is for #4757 (see notes).