Commit f3f1288
authored
Improve test creation performance (#3518)
Test insertion is the most performance-critical part of CDash, simply
because there are often 2-4 orders of magnitude more tests than builds.
Each of those tests then has an additional order of magnitude more
measurements and/or labels associated with it. This PR improves two
things:
1. Only the test output ID is queried instead of the entire model. This
reduces the amount of network I/O to the database.
2. The entire test creation process is wrapped in a transaction. In
addition to ensuring consistency, this also avoids the overhead of
committing after many small transactions.
There's more to be done here, particularly relating to bulk inserts of
labels, measurements, and images, but some substantial refactoring needs
to be done first.1 parent 63343e3 commit f3f1288
2 files changed
Lines changed: 39 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
169 | 169 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
175 | 175 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
180 | 181 | | |
181 | 182 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7062 | 7062 | | |
7063 | 7063 | | |
7064 | 7064 | | |
7065 | | - | |
7066 | | - | |
7067 | | - | |
7068 | | - | |
7069 | | - | |
7070 | | - | |
7071 | 7065 | | |
7072 | 7066 | | |
7073 | 7067 | | |
| |||
0 commit comments