From: Stefan R. <sro...@ar...> - 2012-06-25 22:24:09
|
Hi Folks, Just noticed this by myself. Please always add comments, when you optimize code that results in much more complicate code, but should not be refactored because of an optimization. I forgot this when I worked on http://sourceforge.net/tracker/?func=detail&aid=3515619&group_id=167540&atid=843359 Pre: Let x be the directory length (in characters / byte (depends on encoding)). Let y the number files in this directory and let z be the average length of a filename (in characters / byte (depends on encoding)). Transmitted bytes ... Pre optimization: Bytes for all filenames in a directory: x * y * z After optimization: Bytes for all filenames in a directory: x + (y * z) Regards, Stefan |