Commit 9c0ec48
committed
Remove m_reader / m_builder members from AnalysisContext
Constructing these objects are very expensive compared to the cost of
creating the `AnalysisContext`.
`m_reader` appears to be entirely unused so it is simply removed.
`m_builder` is only used within `Inform`. It may be appropriate to move
it to a local variable within that function, but I'm not sure how often
`Inform` is called. Given that the `Json::StreamWriterBuilder` is rather
expensive to construct I've instead opted to make it static so it is
initialized only on first use and then reused by later calls.1 parent a45466f commit 9c0ec48
2 files changed
+14
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9952 | 9952 | | |
9953 | 9953 | | |
9954 | 9954 | | |
9955 | | - | |
9956 | | - | |
| 9955 | + | |
9957 | 9956 | | |
9958 | 9957 | | |
9959 | 9958 | | |
| |||
10037 | 10036 | | |
10038 | 10037 | | |
10039 | 10038 | | |
10040 | | - | |
| 10039 | + | |
10041 | 10040 | | |
10042 | 10041 | | |
10043 | 10042 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
13 | 23 | | |
14 | 24 | | |
15 | 25 | | |
16 | | - | |
17 | 26 | | |
18 | 27 | | |
19 | 28 | | |
| |||
0 commit comments