rfc: clean it up and optimize#62
Conversation
|
Thank you for your help. This relieves the maintenance burden. But I want to make sure that:
|
| func (f *FibStrategyTree) fillTreeToPrefixEnc(name enc.Name) *fibStrategyTreeEntry { | ||
| curNode := f.root.findLongestPrefixEntryEnc(name) | ||
| for depth := curNode.depth + 1; depth <= len(name); depth++ { | ||
| component, _ := enc.ComponentFromBytes(At(name, depth-1).Bytes()) |
There was a problem hiding this comment.
What is the purpose of this line?
There was a problem hiding this comment.
It's a deep copy. I'm not really sure what is going on here: the underlying array gets deallocated / overwritten somehow if this isn't copied and it becomes garbage. If I remove the copies in this file:
root@0037b98ec2ac:/work/YaNFD# nfdc strategy set /svs/abcdefghijklmnopqrstuvwxyz /localhost/nfd/strategy/multicast
strategy-set prefix=/svs/abcdefghijklmnopqrstuvwxyz strategy=/localhost/nfd/strategy/multicast/v=1
root@0037b98ec2ac:/work/YaNFD# nfdc strategy set /svs/abcdef /localhost/nfd/strategy/multicast
strategy-set prefix=/svs/abcdef strategy=/localhost/nfd/strategy/multicast/v=1
root@0037b98ec2ac:/work/YaNFD# nfdc strategy list
prefix=/ strategy=/localhost/nfd/strategy/best-route/v=1
prefix=/%85h%0E/abcdef strategy=/localhost/nfd/strategy/multicast/v=1
prefix=/%85h%0E/abcdefk%27%07%25%08%09localhost%08%03nfd strategy=/tegy%08%09mul/cas/%20J%07%9F%D4t%E9%03/I%9C%F4Yr%99%A2oT/v=1
root@0037b98ec2ac:/work/YaNFD#
There was a problem hiding this comment.
Thank you for clarifying. This seems to be a big issue. Maybe we should add a comment explaining this.
yoursunny
left a comment
There was a problem hiding this comment.
Ethernet face was last maintained in 2024-Aug and is not broken so it should be kept.
No objection in deleting other features.
|
Thanks for reviewing, Xinyu.
I've more stuff planned for the future (which might not materialize). Essentially I want YaNFD to be the out-of-the box NDN daemon that's focuses on ease of use and is maintanable. I'll elaborate in a Saturday call if you're available.
For now, I don't see the point. Some of the stuff that is removed here can be pulled back in later. My priority for this PR is to nuke the |
If it works then it's probably fine; I'll try to pull this back in. |
|
Then let it die 🙈
Let's do it in a separate PR. This is already too large and it seems to be working. |
rfc: clean it up and optimize
My intention is to rip off everything that isn't or is hard to maintain, and hopefully make this more usable.
Various optimizations
sync.MapBenchmark
GOMAXPROCS=4 GOGC=400 ./yanfdwith one instance of putchunks and 2 instances of catchunks.