Cleaned up the minimal example that demonstrates the performance issue.