[Kst] [Bug 120827] Command line option -f fails for some asciifiles

Ted Kisner tskisner.public at gmail.com
Mon Jan 30 02:41:16 CET 2006


On Sunday 29 January 2006 17:01, George Staikos wrote:
|   I think this is a bad idea.  For instance, a script that tries to check
| the contents of a file will fail.  I'm also not sure where else we might
| have a problem as a result of this.  I don't think this patch can go into
| 1.2.0. Also it introduces a performance penalty for fieldList().

Hmmm, so any other ideas that could be used to fix this issue for 1.2?  If we 
can't fix this regression, then I guess I can just build a patched copy for 
my colleagues that rely on this feature.  

I can't think of a reliable way to do this without breaking the existing 
datasource API.  Basically the whole interface for querying whether a 
datasource supports a file relies on the datasource being able to determine 
global properties of the file without knowing anything about the start frame.  

The new ASCII datasource now effectively requires that the number of columns 
in each row of a text file be constant.

Perhaps as a stop-gap measure, we could have the datasource scan the first 50 
lines (or some large-but-not-performance-killing number) of the file and take 
the maximum number of fields as the number for the whole file.  How does this 
sound?

-Ted



More information about the Kst mailing list