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
table sections : { A1 : string, A2 : int, A3 : string, A4 : string,
A5 : string, A6 : string, A7 : int, A8 : int,
A9 : string, A10 : int, A11 : int, A12 : string,
A13 : string, A14 : int, A15 : string}
PRIMARY KEY (A1, A2, A4)
fun fileText (r : {File : file}) : string =
BlobText.blobText (fileData r.File)
fun importSections (r : {File : file}) : transaction page =
Csv.importTable sections (fileText r) ;
return <xml>Success</xml>
fun main () : transaction page
= return <xml><body>
<h1>The Amazing File Importer!</h1>
<form>Import a file: <upload{#File}/> <submit action={importSections}/></form>
</body></xml>
val main : unit -> transaction page
database dbname=sandbox sql test.sql allow mime text/plain allow mime text/csv allow mime image/png allow mime image/gif library blobText library /home/marko/src/upo $/string test
pgpzLpPmTglYy.pgp
Description: OpenPGP Digital Signature
_______________________________________________ Ur mailing list [email protected] http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
