@mitu OK, thanks for your efforts, for the time being I'll use different board for retropie. It wasn't just the inputlag, they have usefull feature, but I think I have found an alternative that don't seem to have problem with Emulationstation.
P.S.
I'm using a Raspberry pie 3 b+
and the retropie version is 4.5.1
Also when I lauch a game that is long so start (Metal slug ) I can see the input from my joystick on the screen.
And the keys repeat themself for an 2-3 sec before they stopped from repeating.
Seems to me like its a setting on the raspberry /linux.
But I cant find it
I tried "xset -r" to prevent the key to repeat them self, but the command is not recognized.