comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: generating and compiling a very large file
Date: Sun, 3 Jun 2018 21:48:49 +0200
Date: 2018-06-03T21:48:49+02:00	[thread overview]
Message-ID: <pf1gn0$6m3$1@gioia.aioe.org> (raw)
In-Reply-To: b2d2bc59-7283-4a71-b949-2918cd515f90@googlegroups.com

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


  reply	other threads:[~2018-06-03 19:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-03 19:14 generating and compiling a very large file Stephen Leake
2018-06-03 19:48 ` Dmitry A. Kazakov [this message]
2018-06-03 21:43 ` Shark8
2018-06-04 21:56   ` Randy Brukardt
2018-07-13  7:04     ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox