Skip to content

performance: hashing 70000 small files takes 1 hour #579

Description

@danim7

Follow-up to #199

To test that issue, I created a new ~/.aMule dir, and then created 70000 small files in ~/.aMule/Incoming with the following script:

~/.aMule/Incoming$ for i in {1..70000}; do echo $i > $i; done

For comparison, hashing those files outside aMule takes a few seconds:

time md5sum * | tail 701d176c26cc63f973ffa3a8aa6ee011 9990 8121b47dba70756a32330987c462a53b 9991 699703765a69ba897cf53a4b7a2c8f4f 9992 d260e39636b6f228bdd9a8c615e4cd15 9993 c3c80bc1cfcd4aae2e2d66826ee6c503 9994 f3f83b29b8d14dc291ba201dc8d78b18 9995 ab95a164a80caa5a8ad89e76bdad1a77 9996 f05fd6c92e75e2ba2a6b16bf396da351 9997 f8e10ddce21fadab74fc3b2aff593916 9998 9e6b1b425e8c68d99517d849d020c8b7 9999

real 0m6,312s
user 0m0,394s
sys 0m2,034s

However, amuled took 1 hour to hash them.

Recently, many PR have addressed performance issues: #561 #566 #573 Maybe this can be improved too?
I let you decide if this is worth further investigation.
If necessary, I can help debug this. Just let me know what do you need from my side :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions