From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.61.66 with SMTP id n2mr44177978obr.20.1433359185093; Wed, 03 Jun 2015 12:19:45 -0700 (PDT) X-Received: by 10.140.28.73 with SMTP id 67mr462591qgy.36.1433359184980; Wed, 03 Jun 2015 12:19:44 -0700 (PDT) Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!h15no2654836igd.0!news-out.google.com!k20ni45144qgd.0!nntp.google.com!j5no211464qga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 3 Jun 2015 12:19:44 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=83.99.95.161; posting-account=sDyr7QoAAAA7hiaifqt-gaKY2K7OZ8RQ NNTP-Posting-Host: 83.99.95.161 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: How to get this space away? From: Laurent Injection-Date: Wed, 03 Jun 2015 19:19:44 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.giganews.com comp.lang.ada:193471 Date: 2015-06-03T12:19:44-07:00 List-Id: On Wednesday, June 3, 2015 at 9:28:26 AM UTC+2, Dmitry A. Kazakov wrote: > My little program is slowly generating something which looks like the > communication file I need. With this sentence I actually tried to say that it took me quite some time/effort to get to the point that my program is doing what I want it to do. Not always a good idea to translate sentences from ones native language into someone else. > How long are the strings involved? Your code does a lot of shuffling > strings here and there when strings are return values. GNAT wasn't very > good at optimizations of this kind, last time I looked. That is > increasingly inefficient with long strings. You could consider doing string > formatting in-place. I had to increase the length of the V_String to 512 so that the desired final string fits. Just stupid that I use the same V_string to store the SIL_Code and a few other things which are only 6 chars long. Not very efficient. I could as well immediately write the values into the text file instead of glueing everything together and then writing it. The program itself is fast. After hitting enter in the terminal the result appears instantly. Before that it has to read the configuration from 3 different files, put it in the corresponding arrays and do some other operations before it actually generates the string with the result. Thanks Laurent