There are some problems with textlib.replaceExcept() using 'templates' as exceptions e.g. menioned in T63024 or T105620. CPU is time consuming, I found 12% on 8 core processor. I guess there are problems with nested templates.
You may check it with
pwb.py cosmetic_changes -page:Kalle_Svensson -simulate -lang:cs