compiling crashes, compiling and loading slowness

Andrew Wolven <[email protected]> Tue, 14 Apr 2026 05:23:26 -0500
Newsgroups gmane.lisp.steel-bank.general
Message-ID <CANhGVvS3RnUdwsWAU_mgXWo7vsTudrq7SHnEhfJ-B_C2i_PUww@mail.gmail.com>
--===============8729643373765869393==
Content-Type: multipart/alternative; boundary="0000000000001187c4064f68fe80"

--0000000000001187c4064f68fe80
Content-Type: text/plain; charset="UTF-8"

Hi.  I'm not ready to file a bug, just have some anecdotes about my use of
SBCL.  Could spend some time tracking down the issues if no one has
suggestions.

1. I have problems with extremely large source files.  The workaround is to
break them up into smaller pieces, but just to report:  When compiling a
file of about 20 thousand short defmethods, with generic function method
counts usually being less than 5, sbcl often hits a bug "256 is not of type
(unsigned-byte 8)"  something to do with a hash set.  I could replicate it
if necessary.

2. Extremely long function bodies take a really long time to compile.  So
obviously my problems deal with generating code, the previous being C++
bindings, but I also created a function which computes the polynomial which
can be given to a root finder to compute the closed form intersection of
two cubic rational bezier curves in 2-space.  I made the function body with
maxima.  Takes an extremely long time to compile with various versions of
SBCL.  Like 8 minutes.  Loads fast.

3. Initialize-instance, or other CLOS generic functions with large numbers
of methods.  I generated a file for a fairly large C++ dll to create
instances of CLOS wrappers of C++ objects.  So you can just call
make-instance and get and get the method to automatically call "new" and
"constructors" and set up finalizers with destructor and delete.  So I have
an 80,000 LOC file with a few thousand initialize-instance methods, some
just a few lines, others many lines.  It's fast compiling but then takes
like 10 minutes to load.

In another case I compile and load a 250,000 LOC without large numbers of
methods and it compiles and loads in 30 seconds.  So I think large numbers
of methods create a problem.

Obviously I want to come up with ways to narrow down the generated code to
a smaller subset of functionality, but right now I am just seeing the
extents of what types of C++ functions I can wrap.  Maybe I will come up
with a demand-load system.

But does anyone else have problems with slowness and bugs with large source
files on SBCL?

-AKW

--0000000000001187c4064f68fe80
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi.=C2=A0 I&#39;m not ready to file a bug, just have some =
anecdotes about my use of SBCL.=C2=A0 Could spend some time tracking down t=
he issues if no one has suggestions.<div><br></div><div>1. I have problems =
with extremely large source files.=C2=A0 The workaround is to break them up=
 into smaller pieces, but just to report:=C2=A0 When compiling a file of ab=
out 20 thousand short defmethods, with generic function method counts usual=
ly being less than 5, sbcl often hits a bug &quot;256 is not of type (unsig=
ned-byte 8)&quot;=C2=A0 something to do with a hash set.=C2=A0 I could repl=
icate it if necessary.</div><div><br></div><div>2. Extremely long function =
bodies take a really long time to compile.=C2=A0 So obviously my problems d=
eal with generating code, the previous being C++ bindings, but I also creat=
ed a function which computes the polynomial which can be given to a root fi=
nder to compute the closed form intersection of two cubic rational bezier c=
urves in 2-space.=C2=A0 I made the function body with maxima.=C2=A0 Takes a=
n extremely long time to compile with various versions of SBCL.=C2=A0 Like =
8 minutes.=C2=A0 Loads fast.</div><div><br></div><div>3. Initialize-instanc=
e, or other CLOS generic functions with large numbers of methods.=C2=A0 I g=
enerated a file for a fairly large C++ dll to create instances of CLOS wrap=
pers of C++ objects.=C2=A0 So you can just call make-instance and get and g=
et the method to automatically call &quot;new&quot; and &quot;constructors&=
quot; and set up finalizers with destructor and delete.=C2=A0 So I have an =
80,000 LOC file with a few thousand initialize-instance methods, some just =
a few lines, others many lines.=C2=A0 It&#39;s fast compiling but then take=
s like 10 minutes to load.</div><div><br></div><div>In another case I compi=
le and load a 250,000 LOC without large numbers of methods and it compiles =
and loads in 30 seconds.=C2=A0 So I think large numbers of methods create a=
 problem.=C2=A0</div><div><br></div><div>Obviously I want to come up with w=
ays to narrow down the generated code to a smaller subset of functionality,=
 but right now I am just seeing the extents of what types of C++ functions =
I can wrap.=C2=A0 Maybe I will come up with a demand-load system.</div><div=
><br></div><div>But does anyone else have problems with slowness and bugs w=
ith large source files on SBCL?</div><div><br></div><div>-AKW</div></div>

--0000000000001187c4064f68fe80--


--===============8729643373765869393==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============8729643373765869393==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Sbcl-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-help

--===============8729643373765869393==--