#25 Patch for MUTE 0.5.1 UnixSource

open
nobody
None
5
2007-05-07
2007-05-07
Moritz Molle
No

2 Things.

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 :)

greetz

mokrates

Discussion

  • Moritz Molle
    Moritz Molle
    2007-05-07

    the diff

     
    Attachments