This seems pretty basic code which does not involve much processing. One optimization you should do is to change the table type of lt_pd and make it same as that of et_entityset so that the additional loop can be avoided.
Also as suggested by Emanuel you should check the performance trace and analyze where the lag is occurring - Backend or Gateway system.
BR.