DC: fix performance problem when creating filelist
commit5af17a8f7aeac7c37d9f58c6048d0a6a2469e8a6
authorygrek <ygrek@autistici.org>
Sun, 5 Sep 2010 08:53:37 +0000 (5 11:53 +0300)
committerygrek <ygrek@autistici.org>
Sun, 26 Sep 2010 16:08:53 +0000 (26 19:08 +0300)
tree82c60816db005423196d887b52bf77ba20982f41
parent643cc8ae9d9541897d3ff253b3c0221cdb176b35
DC: fix performance problem when creating filelist

Occurs when filelist contains charactes outside of character set
chosen for DC and DcProtocol.utf_to_dc falls back to
slow char-by-char encoding which allocates lots of garbage.
Fix by encoding each filename separately - i.e. triggering
slow encoding less often and for smaller chunks.
src/networks/direct_connect/dcShared.ml