Draft
Conversation
Also introduce a batching delay on all Event.{from,next} calls, except
Event.from calls for tasks. This should help batch up multiple events from
field updates.
There are no extra delays for tasks, because these typically aren't immediately ready,
and when they are we want to immediately find out about it.
This is part of the "feature flag" that turns on the feature
(previously you could've manually edited xapi.conf to make these changes.)
Signed-off-by: Edwin Török <edwin.torok@cloud.com>
This will enable short-circuiting internal API calls. When the FD is missing mark the call as Internal. Signed-off-by: Edwin Török <edwin.torok@cloud.com>
Signed-off-by: Edwin Török <edwin.torok@citrix.com>
…forward the API call directly like we do with the CLI for calls to the coordinator when we are the coordinator Signed-off-by: Edwin Török <edwin.torok@citrix.com>
This has been benchmarked as part of an ocaml-rpc change.
The tail-modulo-cons (TMC) version is the fastest:
```
map/List.map (ns):
{ monotonic-clock per run = 1367.762962 (confidence: 1427.389585 to 1335.537246);
r² = Some 0.885423 }
map/List.rev_map + List.rev (ns):
{ monotonic-clock per run = 758.812720 (confidence: 763.894690 to 753.944851);
r² = Some 0.992898 }
map/TMC map (ns):
{ monotonic-clock per run = 584.662582 (confidence: 589.477056 to 579.975956);
r² = Some 0.991475 }
```
Signed-off-by: Edwin Török <edwin.torok@citrix.com>
Avoid allocating a string for each char. The next step will be to switch to upstream Xmlm for output too (it is currently only used for input). That one has a more optimized escaping function, that can efficiently skip over chars that don't need escaping. Signed-off-by: Edwin Török <edwin.torok@cloud.com>
Signed-off-by: Edwin Török <edwin.torok@citrix.com>
Similar to the ones I've done in `ocaml-rpc`. Ideally we'd drop the duplicate implementation from here, and use the one from `ocaml-rpc` directly, but that is a bigger and riskier change (in case we had some custom hacks in our XML format that some tool ended up relying on). The biggest improvement here is from not calling `String.make 1 c` on each character anymore.
Targeting a feature branch, where it can all be merged to master once testing is complete.
Also introduce a batching delay on all Event.{from,next} calls, except
Event.from calls for tasks. This should help batch up multiple events
from field updates.
There are no extra delays for tasks, because these typically aren't
immediately ready, and when they are we want to immediately find out
about it.
This is part of the "feature flag" that turns on the feature (previously
you could've manually edited xapi.conf to make these changes.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft, waiting for testing and PR reviews to complete.
Depends on:
#6974
#6971
Also would be good to have an updated ocaml-rpc for the JSONRPC fixes in xs-opam.
PRs for ocaml-rpc optimizations:
mirage/ocaml-rpc#194
mirage/ocaml-rpc#193
mirage/ocaml-rpc#192
mirage/ocaml-rpc#184
The optimizations are not strictly required, but the first PR about fixing 4.14 build is, otherwise we can't take the new version into xs-opam.