rule checker consumes too much cpu in big cluster
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Enhancement Task
In some big clusters, rule-checker consumes too much cpu
cluster1:

cluster2:

There are 107 stores and 180w regions in cluster2, and simple rules.
```
[
{
"group_id": "pd",
"id": "dc1-f",
"start_key": "",
"end_key": "",
"role": "follower",
"is_witness": false,
"count": 2,
"label_constraints": [
{
"key": "dc",
"op": "in",
"values": [
"dc1"
]
}
],
"location_labels": [
"dc",
"host"
],
"create_timestamp": 1736992391
},
{
"group_id": "pd",
"id": "dc1-l",
"start_key": "",
"end_key": "",
"role": "learner",
"is_witness": false,
"count": 1,
"label_constraints": [
{
"key": "dc",
"op": "in",
"values": [
"dc1"
]
}
],
"location_labels": [
"dc",
"host"
],
"create_timestamp": 1736992391
},
{
"group_id": "pd",
"id": "dc2",
"start_key": "",
"end_key": "",
"role": "voter",
"is_witness": false,
"count": 3,
"label_constraints": [
{
"key": "dc",
"op": "in",
"values": [
"dc2"
]
}
],
"location_labels": [
"dc",
"host"
],
"create_timestamp": 1736992391
}
]
```
Contributor guide
Assessment
This issue has not been assessed yet.