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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: generating and compiling a very large file Date: Sun, 3 Jun 2018 21:48:49 +0200 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: CvkHMVp693S8Z+lk11jyqg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.3 Xref: reader02.eternal-september.org comp.lang.ada:52889 Date: 2018-06-03T21:48:49+02:00 List-Id: On 2018-06-03 21:14, Stephen Leake wrote: > On my 64bit 32GB ram Windows box running GNAT GPL 2017, this takes 1.5 minutes to compile; slow, but acceptable since I don't compile it very often. In a Debian 8 VM on that same box, allocated 1 GB ram, it takes 11 minutes. I can allocate more ram to that VM, but 1 GB is enough for everything else I do in it, and other people who might use this have slow/small machines. I don't think it is memory. In my case when the compiler runs out of memory it simply crashes with STORAGE_ERROR and prints the infamous BUG REPORT box. Do you use a shared folder? Because if the guest has files in a host's shared folder that makes compilation drastically slower. You could try rsync or winscp to copy files between the host and the guests instead of shared folder. > Is there anything I can do to the code to shorten the compile time? I have complete control over this; for example, I could combine all those Add_Goto statements into one line. I know that using generic packages instances, even only in the with-clause causes a huge impact on both space and time. > A more drastic change would be to put all the numbers in a text file, read in at run time. I haven't tried that yet, mostly because some of those 'null' values are procedure'access in other parts of the file. What about writing a small Ada program that generates an initialized object: State : constant := ( large-generated-aggregate ); I used this approach to embed images. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de