[Kst] branches/work/kst/portto4/kst/src/datasources/ascii
nicolas.brisset at free.fr
nicolas.brisset at free.fr
Sun Sep 5 00:28:20 CEST 2010
Hi Peter,
let me guess: the weather is not better in Berlin than in Munich today. It seems you've been pretty active :-)
Speaking about speed in the ASCII datasource, I haven't looked at the code since you changed it recently but if I remember it correctly in the past we allocated memory in chunks of a fixed size, meaning that if there was a very large amount of data we would do a lot of reallocs. I suspect this is not great performance-wise. I was thinking about a trick that may be helpful: ASCII files should have a size that grows more or less proportionnally with the number of lines, hence samples. That means that when we've read a couple of lines and know the file size, we should be able to determine the number of samples with a fairly good accuracy and realloc directly the right amount of memory.
I don't know how much that would help for performance and if it still makes sense with today's code, but I thought it was worth mentioning.
Thanks for the plot drag&drop stuff, I'll test it and let you know what I think about it.
Cheers,
Nicolas
> SVN commit 1171627 by kuemmel:
>
> Faster loading in debug mode: disable asserts in debug mode
>
> M +43 -24 asciisource.cpp
More information about the Kst
mailing list