On 23 June 2016 at 13:29, Lauri Kenttä lauri.kentta@gmail.com wrote:
This trades some memory for speed, but since currently selecting 1000 files takes over a minute but the required memory for those 1000 filenames is only 262 kB (worst case), this seems a reasonable trade-off.
That's probably fine, but is there any reason this can't use the standard approach of just doubling the buffer size when you run out of space?
If this is performance critical code, the multiple copies of the string related to GetName() probably don't help either.
On 2016-06-23 16:44, Henri Verbeet wrote:
On 23 June 2016 at 13:29, Lauri Kenttä lauri.kentta@gmail.com wrote:
This trades some memory for speed, but since currently selecting 1000 files takes over a minute but the required memory for those 1000 filenames is only 262 kB (worst case), this seems a reasonable trade-off.
That's probably fine, but is there any reason this can't use the standard approach of just doubling the buffer size when you run out of space?
No reason. I'll fix that.
If this is performance critical code, the multiple copies of the string related to GetName() probably don't help either.
I'll fix that too, although it doesn't make much of a difference.
Thanks,