Where to Mount ECU After Rewiring

Maybe the electronics gurus will find this thread. IS having the shorest wires going to the dist the most important pat of the wiring for this or th wires that go to ballast,VR >????? Other than that keeping the ECU away from heat, good ground, (dry??),, is the other part.