Plans on the horizon #1269
Replies: 1 comment 4 replies
-
Thanks for the write-up!
There is some diagnostics using (legacy) TraceSource (see the wiki and #1263). Using Microsoft.Extensions.Logging would be a good upgrade.
Agreed, sounds good.
A good thing that I have also been thinking about lately. We should eventually look to replace all the Begin/End ("APM") methods with truly async implementations (the current implementations mostly just dispatch onto the threadpool). For this we need to make
See #1216 which fixes the warnings. Replacing the
Great. The README could perhaps also get a refresh with more examples. e.g. by following the template of the Microsoft.Extensions.Logging package linked above.
No, but this discussion seems as good as any
I have no preference here (if someone is motivated to write documentation, then whichever format makes them the most motivated is good for me). I will defer to others on that one.
I don't know if there is one. For some background, the library has been nobly stewarded by approximately 1 maintainer for most of its lifetime, and has only recently started to get a bit more love. So things are not so well-defined in that sense. But from my short experience, breaking changes are reasonable particularly in the lower-level areas. From my side, my current list of interests (I tend to jump between things - I know it's bad - I'm not reserving any for myself):
|
Beta Was this translation helpful? Give feedback.
-
Hello @Rob-Hague (CC @WojciechNagorski).
As mentioned in my recent PR, I have a few focus areas that I thought I might start working on and wanted to give you a preview. In no particular order...
Including
ILogger
support and more verbose tracing optionsThis is initially what I came to the project source code looking for. Where I work, we make fairly extensive use of the SFTP features of SSH.NET (thank you) and occasionally connections fail and I would be interested in getting more information about the cause. So I'm looking to update some of the exceptions, add
ILogger
uses, or both.Performance improvements: heap allocations
I've only just started doing some profiling but can see there are lots of areas we are allocating
byte[]
arrays that could benefit from usingReadOnyMemory<byte>
or pooling. For example,Message.GetPacket
popped up on a few of my early profiles that could benefit from some optimization.Performance improvements: async all the way down
In the aforementioned profiling, I also spotted
SocketAbstractions.Send
and have aSendAsync
version that I am testing and will eventually submit a PR for. Lots of other places that could benefit fromAsync
version of methods, but as mentioned in our discussion here, some of which will need discussion with the group because they could make breaking changes in the API or require a lot of conditional compilation.AOT compilation support
I found that
Message.WriteBytes
is doing a lookup ofMessageAttribute
on every packet/message write and contributes a non-trivial amount to the overhead of each message. This got me thinking about not only caching/eliminating the lookup for this attribute, but for AOT down the road. Much longer term goal, but I ran the AOT analyzer to identify problem areas and it doesn't look too difficult.Documentation
I would be happy to update some of the docs (or add them) and/or the wiki with some more information.
So that's what has popped into my head in the first few days of spending time with the code. I'm sure I will come across more areas that will look like fun problems to work on.
Some question that might help me and others:
docs/
folder with markdown files? I tend to prefer the second option since it lives with the repo instead of with GitHub.Beta Was this translation helpful? Give feedback.
All reactions