i tried to block some country IP blocks using this IP deny .htaccess generator:

But my site got around +400ms time to first byte.

Is there any solution which wont signifficantly raise time to first bite (time to load website?)

PS: for this website im on shared hosting, cpanel

i was adviced to use "ipset" if im on VPS or Dedi. Also adviced to deliver site via cloudflare.com (they have country block feature built in) and also adviced to use config server firewal which can do this too.