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> 19-08-2009
 Perl)
On Tue, 18 Aug 2009, Henrik Grubbström wrote:

> 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):
>> 
> [...]
> 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've now implemented a codec for use when decoding the master object.

>>  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.

I've now fixed this issue as well and fixed a few compiler bugs 
along the way (reversing the compiler isn't exactly easy)...

Loading of the dumped master now seems to work for me:

| $ make tinstall
[...]
| $ >test-install/pike/7.8.337/lib/master.pike
| $ touch test-install/pike/7.8.337/lib/master.pike.o
| $ test-install/pike/7.8.337/bin/pike
| Pike v7.8 release 337 running Hilfe v3.5 (Incremental Pike Frontend)
| Terminal closed.

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

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