[Ur] compiler time/space depending on number of table attributes

Marko Schütz Schmuck markoschuetz at googlemail.com
Sun Mar 5 10:44:25 EST 2017


On Sun, 05 Mar 2017 10:51:10 -0400,
Adam Chlipala wrote:
>
> With the extensive compile-time evaluation that comes from Ur/Web's style of
> metaprogramming, it's not surprising that one would encounter superlinear scaling in time
> or space, applying components like those in UPO.  I think your conclusion is correct that
> the type checker isn't to blame. Rather, compile-time reduction was generating exponential
> explosion in code size.
>
> I believe I've fixed the issue, and thanks for reporting it. Don't be surprised to find
> more in the future!  (I had only tested CSV import with about 5 fields, previously.)

after starting the thread I had found the -timing option. So, last
night I timed the compiler stages for different numbers of
attributes. With 15 attributes I had to stop the compiler process,
because it was thrashing and there were no more other processes I
could kill... even left emacs! ;-)

I will try your changes soon.

Best regards,

Marko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-timing.ods
Type: application/vnd.oasis.opendocument.spreadsheet
Size: 26404 bytes
Desc: not available
URL: <http://www.impredicative.com/pipermail/ur/attachments/20170305/02e46889/attachment-0001.ods>
-------------- next part --------------


> On 03/02/2017 04:46 PM, Marko Schütz Schmuck wrote:
> > Dear All,
> > 
> > I naïvely tried compiling a source code file with a table having 15
> > attributes, 3 of which form the key. Also, that table is used with
> > Csv.importTable from upo.
> > 
> > After a few seconds the compiler uses 4GB of memory and 100% CPU and
> > seems stuck. If I reduce the number of attributes to 12 it compiles in
> > ~2m30s total and with only 4 attributes it's done in ~24s total.
> > 
> > In this case I actually do not need all the attributes, but for a
> > future extension I would. I wondered whether the type checker is to
> > blame, but it appears not: with -tc the compiler takes ~24s total for
> > the file with the 15 attributes.
> > 
> > Any recommendations?
> > 
> > Best regards,
> > 
> > Marko
> 
> _______________________________________________
> Ur mailing list
> Ur at impredicative.com
> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP Digital Signature
URL: <http://www.impredicative.com/pipermail/ur/attachments/20170305/02e46889/attachment-0001.sig>


More information about the Ur mailing list