Commit 237ce43
committed
[Rails5] Performance optimizations.
These changes make the full ActiveRecord test suite run about 100s faster from ~580s to ~480s.
* Use the `schema_cache.columns` for the `#primary_keys` method.
* Ensure that `exec_query` uses the proper arity/arg names. Namely `:prepare` opt.
* Ensure all view checks/methods used in `#columns` only.
* Removed view table name detection in `with_identity_insert_enabled` method for fixtures.
* Removed `#select` abstract adapter override since it was the same.1 parent ae0296c commit 237ce43
File tree
4 files changed
+11
-25
lines changed- lib/active_record/connection_adapters/sqlserver
- test/cases
4 files changed
+11
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | 200 | | |
205 | 201 | | |
206 | 202 | | |
| |||
231 | 227 | | |
232 | 228 | | |
233 | 229 | | |
234 | | - | |
235 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
236 | 234 | | |
237 | 235 | | |
238 | 236 | | |
| |||
Lines changed: 3 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
| 257 | + | |
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | 449 | | |
454 | 450 | | |
455 | 451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | 399 | | |
409 | 400 | | |
410 | 401 | | |
| |||
0 commit comments