Hi Joachim,

I tried to reproduce your problem, and I too suggest to change your
parsed program, especially avoiding to write big strings.
I tried a list of 10k string, each of 10 chars, and it works. Well, it
takes some seconds (~15), but perhaps the compiler takes the same time
too.

Btw, I'm reading a file into a variable, then feeding
Compiler.virtualStringToValue:

  local X F={New Open.file init(name:'<some path>' flags:[read])}
     {F read(list:X size:all)}
  in
     {Browse {Compiler.virtualStringToValue X}}
  end

but it should be the same with an in-memory string.

Also declaring functions works.

Enrico

On 10/2/07, Joachim Niehren <[EMAIL PROTECTED]> wrote:
> Dear Andreas,
>
> glad to here from you again :-)
>
> Your proposal, unfortunately, doesn't speed up my applications.
>
> I continue to think that a fix
> of Leif's previous solutions  would solve the problem (work
> around static analysis of the original Mozart compiler), but
> I don't know how to do that precisely. So, my question
> to the Mozart gurus remains open ...
>
> I generate strings from lists of length 5000, 10000, 100000,
> and I need that long strings in my application. Here are the
> runtimes I obtain:
>
>             Compiler.virtualStringToValue   XCompiler.new
> 5000            6 seconds                                 6 seconds
> 10000        13 seconds                               12 seconds
> 100000      > 5 min                                     > 5 min
> (didn't wait for whether it terminates at all)
>
> Yours
> Joachim
>
>
>
> [EMAIL PROTECTED] wrote:
>
> >Dear Joachim, dear all,
> >
> >when I had a similar problem, it turned
> >out to be caused by very long strings
> >in the source code.  If your generated
> >code contains strings, you could try
> >to use the result of
> >  import XCompiler(new) at ...
> >  define MyVirtualStringToValue = {XCompiler.new}
> >as a replacement for
> >  Compiler.virtualStringToValue
> >.  The XCompiler functor is attached.
> >I'm not exactly sure how bug-free it is,
> >but it should be useful and quite reliable.
> >
> >If that doesn't help, I'd suggest
> >you try to find some specific cause
> >for the slowness and then implement
> >a similar workaround.  Or maybe writing
> >the source to a file (wrapped as a functor)
> >and running
> >  {OS.system "ozc ..."}
> >on it is faster?
> >
> >Anyway, good luck,
> >Andreas
> >
> >
> >----------------------------------------------------------------
> >This message was sent using IMP, the Internet Messaging Program.
> >
> >
> >------------------------------------------------------------------------
> >
> >_________________________________________________________________________________
> >mozart-users mailing list                               
> >[email protected]
> >http://www.mozart-oz.org/mailman/listinfo/mozart-users
> >
>
> _________________________________________________________________________________
> mozart-users mailing list                               
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to