Repository navigation
Commit f261697
jun
perf(cursor): resolve the fast-id helper once per request, not per model
The listing branches called await import() inside the row mapper, so a request
with N models paid N dynamic imports on a hot path. Hoist it to one resolution
per request; when the switch is off the value is null and the adapter module is
never loaded at all.
Raised in review of #3233.1 parent 13b007e commit f261697
2 files changed
Lines changed: 16 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1528 | 1528 | | |
1529 | 1529 | | |
1530 | 1530 | | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
1531 | 1540 | | |
1532 | 1541 | | |
1533 | 1542 | | |
| |||
1555 | 1564 | | |
1556 | 1565 | | |
1557 | 1566 | | |
1558 | | - | |
1559 | | - | |
1560 | | - | |
| 1567 | + | |
1561 | 1568 | | |
1562 | 1569 | | |
1563 | 1570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1044 | 1049 | | |
1045 | 1050 | | |
1046 | 1051 | | |
1047 | 1052 | | |
1048 | 1053 | | |
1049 | 1054 | | |
1050 | 1055 | | |
1051 | | - | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
| 1056 | + | |
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
| |||
0 commit comments