Commit efbca69
committed
Improve add_facts performance
When making multiple add_facts calls to add facts to an already
present and large set of target facts performance declines
as more are added due to the initialization and copying of
the large hashes each time.
This change merges the added facts in place to the existing
facts, which provides a slight performance improvement.
!feature
* **Minor add_facts optimization**
Deep merge new facts into existing target fact hash, instead
of creating and copying a new hash each time.1 parent 4b30c39 commit efbca69
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
215 | 226 | | |
216 | 227 | | |
217 | 228 | | |
| |||
0 commit comments