Issue of slow response due to DOM Creation time gap before using JS file