Breaking down a model to only blocks visible Visibility States.

I have a block library of parts with visibility states, essentially 11 individual lengths make up 1 mechanical block, and i switch between lengths when needed.

After assembling something around a building 55m x 35m x 30m high with these visibility states blocks the model is insanely slow. It’s obviously because if the model contains 15,000 visibility states blocks each made up with 11 individual blocks then we have a 15,000 x 11 factor.

Is it possible with one or two clicks to strip the model down (dissolving) so only the individual blocks that are currently visible remain and all the hidden ones each instance are deleted?

I suppose of this is possible its all single threaded and going to take forever, as is always the case in this software.