First I like to thank you for fixing that loop Bug, drove me crazy. Did you use my Patch for a hint?
Second: I write a patch for another cpu-related problem. With every search which comes through the mute-net node, the client searches through the whole shared-files-directory.
I thought about that swarming capability of mute-net, and realized that the clients repeatedly search for the same things (namely hashes). But why always perform a search for the same thing. I implemented a cache for searches, and if there is a search request for something the client searched for before, the cached result is returned.
additionally to that, i added two calls to sched_yield() which hugely improved my systems responsetime. (but not the cpu usage, that got better with the above mentioned implementation).
I don't think you should incorporate this patch without changes. I'm not very good at C++ (better at C), and i did the patch against a 'indent'ed version of you fileShare.cpp, because my nano wasn't liking your way of indentation. So consider it, try it, and look at the cpu-time saved :)
Log in to post a comment.