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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4fbd260da735f6f4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Reading and writing a big file in Ada (GNAT) on Windows XP Date: Sat, 28 Apr 2007 18:56:47 +0100 Organization: Pushface Message-ID: References: <0hj5339mjmond132qhbn2o01unurs61lbj@4ax.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1177783007 1296 62.49.19.209 (28 Apr 2007 17:56:47 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 28 Apr 2007 17:56:47 +0000 (UTC) Cancel-Lock: sha1:sAU1si7XQ6jkoUmRWGoKLqCiP5o= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (darwin) Xref: g2news1.google.com comp.lang.ada:15387 Date: 2007-04-28T18:56:47+01:00 List-Id: Fionn Mac Cumhaill writes: > The modifications consist of replacing a slice of text at the end of > a line with another bit of text. The biggest slice is 10 characters, > and the replacement slice is always smaller than the original > slice. An occasional line of text is about 6000 characters long, but > most are about 700 haracters. Get_Line reads them into a String > variable that is 10,000 characters long. Yesterday I found a performance (and stack!) related problem in GNAT's Ada.Strings.Fixed.Index. The string is mapped onto the stack before the search is done. But I wouldn't have thought this would result in a 5 hour run time. How do you decide which lines need conversion?