Subject: Re: The little SFTP flaw I found

Re: The little SFTP flaw I found

From: Jose Baars <>
Date: Tue, 14 Dec 2010 15:47:08 +0100

2010/12/14 Daniel Stenberg <>

> Unless someone else have any other great ideas, thoughts or comments that
> make change my mind! ;-)
Hi Daniel, very clever and promising!

Just my 2 cents:

Maybe consider changing the linked list in a pre allocated array where the
index has a direct relation
to the sequence number so you can bsearch. I have not sufficiently studied
your code to know if
you could even make the size of the array dependent on STAT result.
It will use a bit more memory, but a lot less CPU, and better elapsed time.
A lot of after the fact performance enhancements I have seen in unrelated
projects consist of getting rid of linked lists,
as searching through it was identified as a bottleneck.

Good luck!

Received on 2010-12-14