If anyone ever wanted to know why the nether portals lag so much, the answer is:

Programmers without a sense for efficency

With the default search range of 128 blocks, > 8.38 MILLION < blocks are checked for being a portal block, in order to check for a nether portal around the passed coordinates. Alot of those blocks can be skipped as the minimum size for a nether portal is known: 2x3x1. This cuts it down by ~83% to ~1.39 million.
If the search was done from the center of the region, evenly towards all directions, one could break out of the loops on the first found portal, which would be even better