Repository navigation
Commit 6db3195
perf: convert pandas result rows in chunks with tolist()
Iterating the object array from to_numpy() creates a numpy view per row.
Convert 1024 rows at a time with tolist() instead, which returns the
same value objects as plain lists and keeps peak memory where it was.
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Co-authored-by: vuanhphung <313058935+vuanhphung@users.noreply.github.com>
Co-authored-by: Isaac <no-reply@databricks.com>1 parent 0167cfd commit 6db3195
2 files changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
134 | 137 | | |
135 | 138 | | |
136 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
121 | 140 | | |
122 | 141 | | |
123 | 142 | | |
| |||
0 commit comments