roxen.lists.pike.general

Subject Author Date
Re: Skipping precompiled master.pike (Re: Startup times Pike vs. Henrik_Grubbström <grubba[at]roxen[dot]com> 18-08-2009
 Perl)
On Tue, 18 Aug 2009, Stephen R. van den Berg wrote:

> Stephen R. van den Berg wrote:
>> Indeed, it finally arrived.  This works.  The good news is, that the
>> usertime for Pike-startup is reduced from 0.66 to 0.60, so we/you shaved off
>> 10% already.  I'll do another round of profiling.
>
> It appears that there are at least still two major roadblocks to getting
> on par with Perl:
> b. In my Pike 7.8 (bleeding edge) it seems to be such that it is *always*
>   skipping the precompiled master.pike.o and recompiling it on the fly
>   at *every* invocation.  Recompiling with debugging reveals something
>   like (and some tiny problems which will be checked in shortly):
>
[...]
> Location=0x9188768 Refs=1, next=0x9182070, prev=(nil), flags=0x0, size=2,
malloc
> ed_size=2
> Type field = array string
> ({
>  "Cannot call unknown function \"functionof\".\n",
>  ({ /* 6 elements */
>      object(src/builtin.cmod:1474),
>      object(src/builtin.cmod:1474),
>      object(src/builtin.cmod:1474),
>      object(src/builtin.cmod:1474),
>      object(src/builtin.cmod:1474),
>      object(src/builtin.cmod:1474)
>  })
> })
> *******************
> Failed to import dumped master!

Looks like decode_value() wants a codec with a functionof(), so that it 
can decode the efun references. The cleanest way to fix this is probably 
to replace the null_program fallback codec in encode.c with one that 
implements a functionof() that indexes all_constants() with its argument.

>  I tried to find out how this can be fixed, but probably got lost in
>  the master classes inherit fest.

It's a bit complicated, yes...

Anyway, when the above problem is fixed, the next issue is that the 
encode/decode value support for extern declared variables might be broken.

>  Judging from the problem at hand, it appears that Pike has not been
>  able to use the precompiled master.pike.o for a long time already.

Probably true.

> -- 
> Sincerely,
>           Stephen R. van den Berg.

--
Henrik Grubbström					<grubba[at]roxen.com>
Roxen Internet Software AB