-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve performance on IActorRef.Child
API
#5242
Merged
Aaronontheweb
merged 20 commits into
akkadotnet:dev
from
Aaronontheweb:perf/improve-ResolveAPI
Sep 2, 2021
Merged
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
9a50416
improveme child lookup performance
Aaronontheweb 0aa7122
modified `IActorRef.Child` API to accept a `IReadOnlyList<T>` instead…
Aaronontheweb bf6e162
fixed a bug with low-level resolution
Aaronontheweb fdac3b9
approved core API changes
Aaronontheweb bc91ad8
approved again....
Aaronontheweb d754014
fixed - was missing one approval
Aaronontheweb 3910d11
added extension method to simplify copying
Aaronontheweb f8f5342
cleaned up RepointableActorRef
Aaronontheweb 3197d0c
cleaned up branching
Aaronontheweb 6b590d7
implemented CopyTo method for debugging
Aaronontheweb 8cce9b7
added child-resolve program
Aaronontheweb 16e33c8
removed expensive allocation from `MinimalActorRef.GetChild`
Aaronontheweb 702d7b8
Merge branch 'dev' into perf/improve-ResolveAPI
Aaronontheweb 26db634
Merge branch 'perf/improve-ResolveAPI' of https://github.com/Aaronont…
Aaronontheweb bc66127
Revert "added child-resolve program"
Aaronontheweb 075159b
Merge branch 'dev' into perf/improve-ResolveAPI
Aaronontheweb d04e5a7
Merge branch 'dev' into perf/improve-ResolveAPI
Aaronontheweb 9f8b852
fixed indexer operation
Aaronontheweb 83224be
simplified branching inside `TryGetSingleChild`
Aaronontheweb 60b3537
removed redundant TryOut methods
Aaronontheweb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,11 +156,9 @@ protected override void TellInternal(object message, IActorRef sender) | |
} | ||
} | ||
|
||
var t = Rec(ImmutableList<string>.Empty); | ||
var concatenatedChildNames = t.Item1; | ||
var m = t.Item2; | ||
var (concatenatedChildNames, m) = Rec(ImmutableList<string>.Empty); | ||
|
||
var child = GetChild(concatenatedChildNames); | ||
var child = GetChild(concatenatedChildNames.ToList()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra allocation in remote deployments here.... might see if I can go about fixing that still.... |
||
if (child.IsNobody()) | ||
{ | ||
var emptyRef = new EmptyLocalActorRef(_system.Provider, | ||
|
@@ -302,7 +300,7 @@ private void HandleDaemonMsgCreate(DaemonMsgCreate message) | |
/// </summary> | ||
/// <param name="name">The name.</param> | ||
/// <returns>ActorRef.</returns> | ||
public override IActorRef GetChild(IEnumerable<string> name) | ||
public override IActorRef GetChild(IReadOnlyList<string> name) | ||
{ | ||
var path = name.Join("/"); | ||
var n = 0; | ||
|
@@ -313,7 +311,7 @@ public override IActorRef GetChild(IEnumerable<string> name) | |
{ | ||
if (uid != ActorCell.UndefinedUid && uid != child.Path.Uid) | ||
return Nobody.Instance; | ||
return n == 0 ? child : child.GetChild(name.TakeRight(n)); | ||
return n == 0 ? child : child.GetChild(name.TakeRight(n).ToList()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another allocation in remote deployments |
||
} | ||
|
||
var last = path.LastIndexOf("/", StringComparison.Ordinal); | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Source-compatible, but not necessarily a binary-compatible change.