I did it in a short period does not sound at all natural.
Time/period are not interchangeable in this way.
'I did it quickly' would be best but otherwise I did it in a short period of time.
short period of time