Commit 4a6c52a
committed
Reduce fetch phase heap consumption
This cuts the peak heap consumption for handling large fetch results by up to 50%
by avoiding having all results as well as their serialized for on heap at the same time.
A follow up can take this to its logical conclusion and pass the network buffer straight
down into the actual fetch execution, avoiding the need to even allocate `SearchHits` in the
first place or if taken yet another step further, it could even go as far as avoiding
the need to allocate the individual hits in full.1 parent c72d00f commit 4a6c52a
File tree
5 files changed
+81
-22
lines changed- server/src
- main/java/org/elasticsearch
- action/search
- search
- fetch
- test/java/org/elasticsearch/search
5 files changed
+81
-22
lines changedLines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
490 | 491 | | |
491 | 492 | | |
492 | 493 | | |
| |||
503 | 504 | | |
504 | 505 | | |
505 | 506 | | |
506 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
507 | 513 | | |
508 | 514 | | |
509 | 515 | | |
| |||
Lines changed: 33 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
| 160 | + | |
166 | 161 | | |
167 | | - | |
168 | | - | |
169 | | - | |
| 162 | + | |
170 | 163 | | |
171 | 164 | | |
172 | 165 | | |
| |||
260 | 253 | | |
261 | 254 | | |
262 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
263 | 287 | | |
264 | 288 | | |
265 | 289 | | |
| |||
Lines changed: 28 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | | - | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| 140 | + | |
139 | 141 | | |
| 142 | + | |
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
| |||
1103 | 1106 | | |
1104 | 1107 | | |
1105 | 1108 | | |
1106 | | - | |
| 1109 | + | |
| 1110 | + | |
1107 | 1111 | | |
1108 | 1112 | | |
1109 | 1113 | | |
| |||
1135 | 1139 | | |
1136 | 1140 | | |
1137 | 1141 | | |
1138 | | - | |
1139 | | - | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
1140 | 1150 | | |
1141 | 1151 | | |
1142 | 1152 | | |
| |||
1146 | 1156 | | |
1147 | 1157 | | |
1148 | 1158 | | |
1149 | | - | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
1150 | 1165 | | |
1151 | 1166 | | |
1152 | 1167 | | |
| |||
1175 | 1190 | | |
1176 | 1191 | | |
1177 | 1192 | | |
1178 | | - | |
1179 | | - | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
1180 | 1201 | | |
1181 | 1202 | | |
1182 | 1203 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
| |||
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
415 | | - | |
416 | | - | |
| 416 | + | |
| 417 | + | |
417 | 418 | | |
418 | 419 | | |
419 | 420 | | |
| |||
601 | 602 | | |
602 | 603 | | |
603 | 604 | | |
604 | | - | |
| 605 | + | |
605 | 606 | | |
606 | | - | |
| 607 | + | |
| 608 | + | |
607 | 609 | | |
608 | 610 | | |
609 | 611 | | |
| |||
624 | 626 | | |
625 | 627 | | |
626 | 628 | | |
627 | | - | |
| 629 | + | |
628 | 630 | | |
629 | 631 | | |
630 | 632 | | |
| |||
0 commit comments