perf($compile): only iterate over elements with link functions