Loop processing

I have a loop process that uses while to refresh the browser until a specific element is found.

At first there is no problem, but after a few minutes the speed becomes very slow. If I stop the process and run it again, it speeds up again, but then slows down again.
Is this a problem with my computer specs?

I would appreciate it if you could tell me.

Please read and post again after you have read it:

It’s not a problem with you. DDT takes more than 4 hours in Katalon, I do it with the same computer in IntelliJ using TestNG framework, it takes 1 minute. Katalon very slow and problematic in loops