Commit bc0c1c7
committed
Conditionally call
Currently, every time `UpdateTopic` is called, `@DeleteRelationships` is called, and then all relationships are resaved via `PersisRelations()`. This adds unnecessary overhead when references aren't all resolved, as we know we're going to have to call `Save()` on those topics _again_ once the topic graph has been saved.
To reduce this overhead, we're now conditionally calling `PersistRelations()` based on the `areReferencesResolved` flag.
_Note:_ The `@DeleteRelationships` parameter is also conditionally set based on this—but that was inadvertantly committed as part of a previous commit (0c860ae). Whoops! Future readers: I apologize or the messy commit history.PersistRelations()
1 parent b3aca78 commit bc0c1c7
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
469 | | - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
470 | 472 | | |
471 | 473 | | |
472 | 474 | | |
| |||
0 commit comments