I believe the closer the inverter is to your panels the less loss there is but at the same time the inverter needs to be kept in cool shaded for it to function optimally.
Distance between solar panels and inverter.
The shorter the better.
The ohmic resistance is.
I would guess the cable distance between panels and inverter would be 15 meters.
Power optimizers can be thought of as a compromise between string inverters and microinverters.
Generally it is easier to keep the solar inverter close to the solar panels and have a longer length of ac cable to the grid connection.
The distance between the solar pv panels and the solar power inverter is 15 meters.
As a result the total cable length in where the direct current flows is 30 meters outgoing and incoming cable.
But if the panels are wired in series which increases the voltage much longer wire runs can be done.
We use a solar cable with 4mm cable cross section area.
Like microinverters power optimizers are located on the roof next to or integrated with individual solar panels.