[Kst] Re: branches/work/kst/portto4/kst/src/datasources/ascii

Peter Kümmel syntheticpp at gmx.net
Mon Jan 24 18:15:19 CET 2011


On 24.01.2011 17:30, Brisset, Nicolas wrote:
>> Fixed-width columns are optimized, column width == 5
>>  1234 1234 1234 1234;
>> -1234-1234 1234 1234;
>> -1234 1234 1234 1234;
>> +1234 1234-1234-1234;
>>
>> but we could also optimize for different column width are constant:
>>  1234; 123456789; 12; 1234444;
>>  1234;-123456789; 12;+1234444;
>>
>> only the place of the ; has to be the same in each row.
>>
>> And I've seen no problems when the number string starts with a
> whitespace.
> OK, here are a couple of questions to be able to improve the GUI, which
> is a bit broken/hard to figure out currently.
> 
> So if I understand it correctly, when all columns don't have the same
> width but each still has a constant width, then we can perform a
> specific optimization. Is that correct? 

Yes, this was the initial idea.

> 
> Can we optimize more if all columns have the same width than if each has
> a constant width?

Isn't this the already available option.

> 
> And another important question: can you compute the width of each column
> reliably when they are delimited by whitespace, or does it need a custom
> delimiter? Finding out the width with whitespace sounds tricky, because
> you could have a sign coming only after a large number of samples, and
> we can't parse the whole file to determine which optimization is
> applicable!

To find the column start I use the old algorithm but stop when I've find
it an remember the position. So when we search for whitespace I don't see
a problem, for instance, when we are looking for column 2

1234 -88888
1234  99999

it would always use the first space after 1234.


> Or do we have a simple criterion such as: the first whitespace char
> after the numbers in a given column are always aligned?

OK, now I understand:

1234             8888888
1234567898       9999999


this would not work. The numbers must be aligned to the right.

> 
> Depending on your answers, I think we have to change the GUI (and
> unfortunately the code and possibly storage format in the .kst) a bit. 
> 
> Nicolas
> 
> P.S.: since we're doing so much work on the ASCII datasource, I think
> I'll end up adding units as well for 2.0.3. 

OK, why not.

> 
> 
> Eurocopter Deutschland GmbH
> Sitz der Gesellschaft/Registered Office: Donauwoerth
> Registergericht/Registration Court: Amtsgericht Augsburg HRB 16508
> Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: Dr. Lutz Bertling
> Geschaeftsfuehrung/Board of Management:
> Dr. Wolfgang Schoder, Vorsitzender/CEO; Friedrich-Wilhelm Hormel; Ralf Barnscheidt
> 
> CONFIDENTIALITY NOTICE 
> 
> This communication and the information it contains is intended for the addressee(s) named above and for no other persons or organizations. It is confidential and may be legally privileged and protected by law. The unauthorized use, copying or disclosure of this communication or any part of it is prohibited and may be unlawful. 
> If you have received this communication in error, kindly notify us by return e-mail and discard and/or delete the communication. Thank you very much. 
> It is possible for e-mails to be intercepted or affected by viruses. Whilst we maintain virus checks on our e-mails, we accept no liability for viruses or other material which might be introduced with this message. 
> 
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
> 


More information about the Kst mailing list